2

I am writing a script that runs from a user account. The script needs to execute another script as the Administrator account.

  • Tried AutoIt's RunAs - didn't work.
  • Tried PsExec - the same.
  • Tried CMD's RunAs - needs manual typing of password.

What are my other options?

1
  • Could you provide examples of the syntax you used with each option? Which version of Windows are you using? How is UAC configured?
    – jscott
    Oct 31, 2014 at 9:37

2 Answers 2

0

I use Runasspc by Robotronic.de. With it it you can create an encrypted script file and run it in command line.

Unfortunately the official site (http://www.robotronic.de/runasspcEn.html) is not working properly at the time, so you cannot download it from there. However I found the runasspcen.zip (contains the executables and instructions) from here: http://www.leblogosd.fr/wordpress/runas-en-ligne-commande/

2
0

Try running psexec with the -i option. That will run the command as the System user which basically gives it god mode.

You can write some impersonate code that will accomplish the same thing. There is a SystemElevate.au3 on the autoit forums that has been put together.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .