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?

jscott
  • 24,204
  • 8
  • 77
  • 99
Omar
  • 21
  • 3
  • 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 '14 at 09:37

2 Answers2

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/

Ciove
  • 211
  • 2
  • 8
  • The Robotronic.de had similar application called RunasRob. I haven't studied it, but it may suit your purposes: http://www.robotronic.de/runasroben.html – Ciove Oct 31 '14 at 10:15
  • Now the download from http://www.robotronic.de/runasspcEn.html seems to be working OK. – Ciove Nov 03 '14 at 13:52
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.

Super1337
  • 474
  • 2
  • 4
  • 9