Windows Vista Secret #10: Open an Elevated Command Prompt in Six Keystrokes

Windows Vista Secret #10: Open an Elevated Command Prompt in Six Keystrokes

  • Comments 19

User Account Control is, as I mentioned in secret #4, an important part of the security protection that Windows Vista offers. For any user with administrative credentials, you can always execute a process with full admin rights by right-clicking on the executable or shortcut and choosing "Run as Administrator".

For myself, I regularly want to open an admin-level command prompt, and it's a distraction to have to move my hands off the keyboard to go through the elevation contortions. So I was delighted to find a little keyboard shortcut for launching an elevated process. Simply press Ctrl+Shift+Enter from the search bar on the start menu with a selected application, and that triggers elevation.

For example, to launch an elevated command prompt, simply press the Win key; type cmd; press Ctrl+Shift+Enter; and then hit Alt+C to confirm the elevation prompt. Six keystrokes to an elevated command prompt!

(Once I've got an elevated command prompt, I always like to execute color 4f as my first input so that this console window is visually differentiated from other non-elevated windows.)

  • Tim Sneath , one of the Windows Vista Technology Evangelists, has a great series going on his blog -

  • I use Windows Vista Secret #5: I added a command prompt  shortcut to the quicklaunch and in it's properties, Compatibility tab checked "Run this program as an administrator." So it's two keystrokes: Win+4, Alt+C. :-)

  • Family morning at the Gentiles means the whole family watching Radiohead from 1994 while waiting for

  • I do it exactly the same way I do in XP.  Windows+R then type 'cmd' and hit enter, as everything executed from the Run menu has elevated permissions...

  • Hi Simon - nice to hear from you! Actually, this doesn't work for me, at least not in the standard configuration. The telling difference is the lack of an "Administrator:" prefix to the title of the command window. Maybe you have UAC disabled?

  • I am pretty sure I have UAC enabled (I'll check when I get back tonight).  Do you not see under the Run textbox the Windows Shield with 'All Tasks will execute as Administrator' written next to it?

    I am still on Beta 2 at home so that may be the difference...?

  • Ok, you are right, you only get what I was describing when you turn off UAC.

  • This is unacceptable, thus I changed the policy to "elevate without prompting"

    My normal method is to have cmd prompt on top of the Start Menu, then press Win, down arrow (select the top item), enter. This still works in Vista if above policy change is made to "User Account Control: Behavior of the elevation prompt for standard users"

  • I've a small problem with this. While the ctrl-shift-enter trick works if the search box finds an executable, it doesn't seem to work if it finds a shortcut (in that case, ctrl-shift-enter apparently does nothing).

    The Windows SDK installs a shortcut called "CMD shell" which opens a command prompt with the proper environment variables for the SDK set. So when I type cmd in the search box, it gives that shortcut as a result, not cmd.exe, and ctrl-shift-enter doesn't work. I have to type "cmd.exe" into the box for your tip to work.

  • Well it has been a long, long, difficult project, but come tomorrow around 8:30 my time, all of my long

  • cmd.exe?

    I think you means powershell.exe ;)

  • I'm loving Windows Vista RTM. I'm actually considering moving my main development PC over - just need to be certain that everything I use will work just fine - in the meantime, I'll stick with it running from my Core...

  • I'm using the RTM, and this doesn't work for me. I've tried "cmd" and "cmd.exe". In both cases, pressing SHIFT+ENTER does nothing (Start menu vanishes, but no command prompt appears).

  • I was able to elevate the SDK Command Prompt shortcut with the "CTRL+SHIFT+ENTER" when focused on it in the start menu.

    btw - Great Tip

  • Via Tim Sneath I've learned that you can start an elevated command prompt from the Start Menu. Press

Page 1 of 2 (19 items) 12