Stefan Krueger of the InstallSite Blog links to two posts describing how to elevate scripts, that is to run them with administrator rights. One has an example for VBScript and the other one is for JScript. Both solutions use a wrapper script that launches the main script. Note that they don't circumvent UAC. If an admin is running this script, she will get the UAC prompt if this feature is not disabled. Under Windows XP, you only had the problem of running scripts with sufficient privileges, while under Vista you have the additional problem of telling UAC that a script will need admin privileges. So you have to take two lines of defense now before actually getting things done.

  1. Leonardo 15 years ago

    On my personal machine, I have the prompting off but UAC still on. IE still runs in protected mode and applications still run with user credentials…

    I figure, what the hell: Never had a virus/trojan/spyware problem all these years, why start now?

  2. Michael Pietroforte 15 years ago

    You’re right it makes sense to just disable UAC prompting. However, I am still undecided if we shall turn off UAC prompting by default in our network. UAC without these nagging prompts is certainly a security improvement.

Leave a reply

Your email address will not be published.


© 4sysops 2006 - 2022


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account