Sign in to follow this  
Followers 0
LVCVA

RunAs Test Script not working

3 posts in this topic

Here is my script which is taken directly from the AutoIt Help file under RunAs

CODE
; Fill in the username and password appropriate for your system.

Local $sUserName = "Username"

Local $sPassword = "Password"

; Run a command prompt as the other user.

RunAs($sUserName, @ComputerName, $sPassword, 0, @ComSpec, @SystemDir)

I compiled this into an EXE and when I run it, nothing happens. Any suggestions?

Share this post


Link to post
Share on other sites



... you compiled that exact code? That won't do anything because I'm sure your computer doesn't have a user named Username with password Password.


Regards,Josh

Share this post


Link to post
Share on other sites

I guess I should have clarified that. I changed the username and password to a valid one. I tried it with both a local PC account and a domain account, but it didn't make a difference.

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  
Followers 0