Jump to content

RunAsSet with Win2000


sekyao
 Share

Recommended Posts

Hi, i have a problem here.

I have script below:

RunAsSet("administrator", @Computername, "mypassword")

; run as computer administrator

RunWait  ("newping.exe")

If FileExists("c:\accesslog\newping.exe") Then

  Run("d:\accesslog\newping.exe", "", @SW_HIDE)

else

  MsgBox(0, "ERROR For Program Setup", "Can Not Find Access Log Program!", 50) 

EndIf

RunAsSet()

what happen is that even though the username and password is correct, win2000 still ask for the option to "install the program as other user".

anyone have any idea on this issue?.

Sorry, but i'm still new in this scripting language.

edit:

I have double check and Secondary Logon is enable automatically.

Edited by sekyao
Link to comment
Share on other sites

This is from Autoit help file:

Remarks

This function allows subsequent Run and RunWait functions to run as a different user (e.g. Administrator). The function only works on the 2000/XP (or later) platforms. NT4 users should install and use the SU command from the NT Resource Kit.

The "Secondary Logon service" or "RunAs service" must not be disabled if you want this function to work.
Link to comment
Share on other sites

This is from Autoit help file:

Remarks

This function allows subsequent Run and RunWait functions to run as a different user (e.g. Administrator). The function only works on the 2000/XP (or later) platforms. NT4 users should install and use the SU command from the NT Resource Kit.

The "Secondary Logon service" or "RunAs service" must not be disabled if you want this function to work.

<{POST_SNAPBACK}>

the script is executed from computer running windows 2000 pro OS , hence win2000. also i have checked and the secondary logon service is enabled.
Link to comment
Share on other sites

Actually this field will work for either, depending on the situation. If you are attempting to RunAs a domain administrator then this needs to be a valid Domain Controller. If you are attempting to RunAs a machine administrator (of the specific machine the script is running on) then it is also fine if you use the computer name in this parameter.

Matt

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...