I recently wrote about a way to add an Open Command Window Here as Administrator right-click context menu for folders...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
in Windows Vista. I also recently read an article by Michael Murgolo that discusses a bunch of similar tools he had created (based on scripting work done by Microsoft software design engineer John Stephens), but with broader functionality: a set of "Elevation PowerToys."
These tools, as a group, are a way to make dealing with elevating privileges, or dealing with UAC, a little easier in Vista. Most, if not all, of what they address, is not handled very elegantly by default in Windows Vista. For instance, there's really no easy way to launch a process from a command line in Admin mode. All these tools, once installed, can be removed through the Add/Remove Programs menu.
The most basic of these tools is the Elevate Command PowerToy, in the form of a command-line executable (elevate.cmd), which can be invoked from the command line itself or from a script. Use the syntax elevate
Note: Whenever you do this, you'll of course get a corresponding UAC prompt; you can't use this program to avoid the UAC dialog, which is deeply ingrained into the way Windows Vista behaves now. (It itpossible to toggle UAC off with a command-line action, but that in itself will require a UAC authentication!)
Another PowerToy in the kit is Run as Administrator for Scripts, which adds a right-click context menu for .VBS/.WSH scripts that lets you run them as administrator as well. The technique for doing this is essentially the same for elevating other file types as well, and Murgolo has included an example of how to do this for .MSI packages as well.
Note: If you try to install an .MSI package in Vista, you're going to get a UAC prompt anyway; this just pre-emptively authorizes the .MSI to run as admin and install without a prompt later on down the line.
Finally, there's a way to open command prompts, both as regular user and as admin, in any folder (again, as a right-click context menu) -- anda similar technique, used to open a Windows PowerShell prompt in any folder. Needless to say, the latter presupposes that you have PowerShell installed.
About the author: Serdar Yegulalp is editor of the Windows Insight, (formerly the Windows Power Users Newsletter), a blog site devoted to hints, tips, tricks and news for users and administrators of Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Vista. He has more than 12 years of Windows experience under his belt, and contributes regularly to SearchWinComputing.com and SearchSQLServer.com.
More information on this topic:
- Tip: Work around Windows Vista's slow copying of data
- Topics: Windows Vista tools
- RSS: Sign up for our RSS feed to receive expert advice every day.