106
57
As a developer, I often have the need to open a command prompt for various purposes. For example, I use iisreset
to restart my local web server.
I typically open the command window in one of two ways:
- Press Win, type "cmd" and press Enter
- While in Explorer, hold Shift and right click on a folder, and choose "Open command window here"
However, when I open the command window in either of these ways, I do not have the full administrator privileges that I feel I am entitled to.
In order to run administrator-only applications, I have to open the command line in this relatively laborious way:
- Press Win, type "cmd"
- Wait for the menu to populate
- Lift hand off the keyboard and put it on the mouse
- Right click the "cmd.exe" menu item
- Choose "Run as administrator"
This is unacceptable for several reasons:
- The window always opens in C:\windows\system32, rather than my
Users
directory (as in approved technique 1) or the folder I want to be in (as in approved technique 2). So I often have to change directories to get where I want to go. - This process is several milliseconds slower than either of my preferred methods. Performed several times a day, every day for the remainder of my career, it adds up to about ten days of lost time spent clicking and waiting and directory changing.
- As a programmer, performing a pointless robotic task causes me great emotional pain.
- As a programmer, lifting my hand is a strenuous task that causes me great physical pain.
That is why I am looking for a one-and-done solution that will let approved techniques 1 & 2 open administrator command prompts.
Many programs let you permanently change their default privilege level from the Properties menu. Command Prompt is not one of those programs.
How do I make the command window run as administrator by default (even when using the "Open command window here" context menu option)?
6I think its Hammer Time... – ThunderToes – 2014-09-23T08:42:55.230
Why not just change UAC to elevate only? – surfasb – 2012-07-26T02:46:30.350
I don't see an "elevate only" option on my UAC slider. Are you referring to something besides the User Account Control Settings window? – Kevin – 2012-07-26T11:37:16.127