LVCVA Posted August 12, 2008 Share Posted August 12, 2008 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? Link to comment Share on other sites More sharing options...
JFee Posted August 12, 2008 Share Posted August 12, 2008 ... 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 Link to comment Share on other sites More sharing options...
LVCVA Posted August 12, 2008 Author Share Posted August 12, 2008 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now