Jump to content

Recommended Posts

Posted

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?

Posted

... 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

Posted

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.

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
×
×
  • Create New...