Featured Resource:

line

Newsletter

Email Address:


line

Ask the Expert

Have a question for our resident expert? Email your questions to Bob or post in the Forum.

« Office 2003 SP3 and Vista Task Scheduler | Main | WMI Control in Vista »

Run Commands Elevated In Batch Scripts

While there is no elevation command in Vista so that your tools will run with administrative privileges, there is the Elevate Command PowerToy which can get the job done. It was written by Michael Murgolo, a consultant with Microsoft Consulting Services

The tool is discussed here:
http://www.microsoft.com/technet/technetmag/issues/2007/06/UtilitySpotlight/default.aspx.

And is available for download here:

http://www.technetmagazine.com/code07.aspx

Scroll down to : June 2007 and it is listed under “Utility Spotlight: Script Elevation PowerToys for Windows Vista” (Utility2007_06.exe)

Just give it a simple -? to view the syntax, but as you might expect it is simply:

Elevate cmd.exe

Any tool, or arguments for this such as opening a specific file or running a specific script follow just as you would normally enter them at the command line.

Library Resources

line
line

Bob Kelly's Bio:

Bob Kelly is the founder of AppDeploy.com — a resource focused on desktop management products and practices. He is author of the Start to Finish Guide to Scripting with KiXtart and The Definitive Guide to Windows Desktop Administration. He is also president and co-founder of iTripoli, Inc. who provide AdminScriptEditor.com, home to an integrated suite of scripting tools and a shared library of scripts and language help. Not enough? For more on Bob click here.