While I think UAC is a good thing, it gets pretty annoying when running lots of commands at the command line that just turn around and say "sorry, I need to be elevated". I've blogged before about using AutoHotkey to run commands bound to keyboard shortcuts and I use Win+P to pull up a command prompt with all the environment variables set so that I can access developer tools like devenv and csc. Finally I started to look around at a way to bind an elevated command prompt to a keystroke.

The problem is that the runas command allows you to run as a different user but not as the same user but elevated. John Robbins obviously had this problem too and he wrote a blog article just over a year ago with his elevate command line app to overcome this.

Using elevate, I now can press Ctrl+Win+P when I want an elevated command line and then just hit Alt+C to continue past the UAC dialog.

posted on Wednesday, April 30, 2008 3:05 PM |
Comments
Gravatar
# re: Elevated command prompt from a hotkey
Posted by James Snape on 5/1/2008 9:57 AM

Can you post the script?
Gravatar
# re: Elevated command prompt from a hotkey
Posted by James Snape on 5/1/2008 9:57 AM

Can you post the script?
Comments have been closed on this topic.