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 in chief of 4sysops. He has more than 35 years of experience in IT management and system administration.

Are you an IT pro? Apply for membership!

0
Share
2 Comments
  1. Leonardo 12 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 12 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 *

*

© 4sysops 2006 - 2019

CONTACT US

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

Sending

Log in with your credentials

or    

Forgot your details?

Create Account