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? Commented 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
  • The Robotronic.de had similar application called RunasRob. I haven't studied it, but it may suit your purposes: robotronic.de/runasroben.html Commented Oct 31, 2014 at 10:15
  • Now the download from robotronic.de/runasspcEn.html seems to be working OK. Commented Nov 3, 2014 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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.