Is there a faster way to open a process as Administrator (With UAC enabled)?

Currently (In Windows 10) - if I want to open a CMD prompt, I'll hit the Windows key, type CMD and hit Enter. If I want it open as an administrator, I have to right click the item and click Run As administrator. Is there a way I can do this without using the mouse?

enter image description here


Solution 1:

By holding CTRL + SHIFT whilst pressing Enter, it opens as an administrator.

Seems you can also hold CTRL + SHIFT + Left Click a CMD window on the taskbar (probably other applications too) to open a new one as an administrator also.

Confirmed working in Windows 7, 8, 8.1 and 10.

Solution 2:

For Windows 8.1 and 10 English, to open an Adminstrator command prompt using the keyboard use

Windows Key + X followed by A

For other languages, the appropriate key to use will be indicated by an underline in the pop-out menu.

Solution 3:

Ctrl+Shift+Enter is convenient, but if you prefer Linux-like environment, you can save this script as sudo.cmd somewhere in your PATH:

@echo Set objShell = CreateObject("Shell.Application") > %temp%\sudo.tmp.vbs
@echo args = Right("%*", (Len("%*") - Len("%1"))) >> %temp%\sudo.tmp.vbs
@echo objShell.ShellExecute "%1", args, "", "runas" >> %temp%\sudo.tmp.vbs
@cscript %temp%\sudo.tmp.vbs

Then you can use this command:

sudo cmd

Original Source

Solution 4:

If you find yourself opening administrative command prompts all the time, you can create a shortcut on the taskbar:

  1. Find Command Prompt in the search results. (Searching for cmd works.)
  2. Right-click it and choose Pin to taskbar.
  3. Open the taskbar shortcut's properties by right-clicking the icon, then right-clicking the Command Prompt entry that appears and choosing Properties.
  4. On the Shortcut tab, click the Advanced button.
  5. Check Run as administrator and OK out of the properties window.

You can now activate that shortcut by holding the Windows key and pressing the number that represents the position of that icon (not including the standard Windows 10 desktop switcher icon). For example, if your command prompt icon is the second pinned item, pressing Windows+2 would activate it. Pressing Alt+Y accepts the UAC prompt. That's just two keyboard commands, for a total of four keys, no mouse.