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.

Michael Pietroforte

Michael Pietroforte is the founder and editor of 4sysops. He is a Microsoft Most Valuable Professional (MVP) with more than 30 years of experience in IT management and system administration.

Win the monthly 4sysops member prize for IT pros

Share
0

Related Posts

2 Comments
  1. Leonardo 10 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?

    0

  2. Michael Pietroforte 10 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.

    0

Leave a reply

Your email address will not be published. Required fields are marked *

*

CONTACT US

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

Sending
© 4sysops 2006 - 2017

Log in with your credentials

or    

Forgot your details?

Create Account