Jump to content
Sign in to follow this  
jftuga

RunAs() not working

Recommended Posts

jftuga

NEVERMIND ...wrong user name :idea:

-----

My script works as expected from my dev system, but not on a system that I want to deploy to. All systems are Windows XP SP3. I am using version 3.3.4.0. Would the newest version of AutoIt make any difference in this situation?

$rv = RunAs( $u, @ComputerName, $p, 0, @AutoItExe, "c:\windows" )
MsgBox(0, $rv, @Error & " " & @AutoItExe)

@AutoItExe is located in c:\windows

when this code runs, rv = 0 and @Error = 1

What does 1 mean? I know I am typing in the correct password.

Thanks,

-John

Edited by jftuga

Share this post


Link to post
Share on other sites
dobbelina

NEVERMIND ...wrong user name :idea:

-----

My script works as expected from my dev system, but not on a system that I want to deploy to. All systems are Windows XP SP3. I am using version 3.3.4.0. Would the newest version of AutoIt make any difference in this situation?

$rv = RunAs( $u, @ComputerName, $p, 0, @AutoItExe, "c:\windows" )
MsgBox(0, $rv, @Error & " " & @AutoItExe)

@AutoItExe is located in c:\windows

when this code runs, rv = 0 and @Error = 1

What does 1 mean? I know I am typing in the correct password.

Thanks,

-John

Try this:

$rv = RunAs( $u, @ComputerName, $p, 0, @AutoItExe, @ScriptDir)
MsgBox(0, $rv, @Error & " " & @AutoItExe)

Share this post


Link to post
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
Sign in to follow this  

×