Finding the "Run as administrator" command, a game of hide-and-seek

Back in the old days, the "Run as administrator" menu option was placed on the extended menu. To get the extended menu, you hold the shift key when you right-click on the shortcut.

In Windows 7, the "Run as administrator" option was moved to the primary menu, so you no longer need to hold the shift key to get it.

Well, except that sometimes you still need to hold the shift key.

The deal is that there are two "Run as administrator" commands. One of them is for running shortcuts to regular applications as administrator. The other is for running shortcuts to MSI applications as administrator. Shortcuts to MSI applications are weird because they aren't shortcuts to EXEs but rather are shortcuts to an entry in the MSI database.

When the decision was made to move the "Run as administrator" command from the extended menu to the primary menu, the person who made the change moved only one of the "Run as administrator" commands (the one for regular application) and forgot to move the other one (the one for shortcuts to MSI applications). As a result, you still need to hold the shift key to run MSI applications elevated.

The problem is fixed on the Windows 8 Start menu. It correctly shows the "Run as administrator" option for both shortcuts to regular applications and shortcuts to MSI applications.

Comments (46)
  1. Joshua says:

    Hide and go seek … The real fun is trying to get admin cmd prompt on a laptop with no right mouse button and no context menu key on Windows 8.1. We finally gave up and got a USB mouse.

  2. Joshua says:

    Hide and go seek … The real fun is trying to get admin cmd prompt on a laptop with no right mouse button and no context menu key on Windows 8.1. We finally gave up and got a USB mouse.

  3. gm2k says:

    @Joshua: Win+X -> A would have done the trick.

  4. Wilhelm Svenselius says:

    Sorry Joshua, you simply didn't try hard enough. Search for "cmd", the top result will be Command prompt. Long tap. Select Run as adminstrator from the context menu.

  5. parkrrrr says:

    windows key / cmd / shift-control-enter.

  6. Erik says:

    Is there a technical reason the fix didn't get implemented in Windows 7 using some kind of update?

  7. ppindia says:

    @gm2k, @parkrrrr I dont think there is a win key in the virtual keboard in the tablet you need to attach a keyboard to do it.

  8. @ppindia: Actually, I was under the impression Joshua was referring to an Apple laptop, since virtually all Windows trackpads include a right mouse button and he specifically says "laptop".  To do a right-click on an Apple laptop, you have to do a two-finger click gesture.  It's pretty awkward, but I find that true with most of Apple's mouse gestures (and trackpad gestures in general, really).

  9. parkrrrr says:

    @ppindia my point remains: once you've found command prompt (or anything else)  from the start menu search, shift-control-enter will run it as admin.

  10. Joshua says:

    @Wilhelm Svenselius: No right mouse button, no context key, no windows key. How do you get the context menu open?

    @MNGoldenEagle: Yes, Apple laptop. Need driver to get the right click gesture. Need admin to install driver (doesn't auto-elevate for reasons unknown).

    @parkrrrr: Control-shift-enter works but like everything else in metro, completely non-discoverable even if I wasn't effectively blind while using it. Didn't know that key-combo until today.

  11. Katie says:


    There is also a "runas" command.

  12. Dan Bugglin says:

    @Joshua Mousekeys

  13. A says:

    Three weeks ago I bought a new (PC) laptop and right-click was turned off by default. In the settings I could assign various types of clicks (e.g. "click with two fingers") to the "left-click" and "middle-click" actions. What did they call right-click? "Popup menu". It took some time to figure this out.

  14. Bart says:

    @Joshua, you can't blame metro for the obscurity of ctrl+shift+enter, since the combination predates it. It is at least as old as Vista, possibly older, but my memory apparently isnt't what it used to be.

  15. Scott Brickey says:

    The real challenge in Windows 8 is running INTERNET EXPLORER as administrator (as occasionally needed by apps such as SSRS or SharePoint) from the start screen/menu.

    You can't simply right click on the icon (start screen or complete app list), and shift + right click is no different.

    Instead, you actually need to type "iexplore.exe" (to bring it up in the search results), then right click the EXE… to run as admin.

  16. morlamweb says:

    I'm grateful that the Run as Admin option moved to the primary menu.  I'd say it's move was pretty much required by the move to filtered user tokens in Vista.  That's where, with UAC active, programs launched by users even in the admin group don't run with admin rights by default.  In tech support, I've lost count of the number of times that I've had to tell my customers to run this setup program with Run As Admin.  "But I'm logged in as an admin!!1!" they say; but their corporate policies require UAC to be active, and in that case, the installer won't run by default with admin rights.  My thanks to whoever suggested that the Run as admin option should be moved to the primary menu.  That being said, I never noticed that the equivalent option for MSIs is not on the primary menu… probably because we use separate EXEs to launch the MSI setups.

  17. IanBoyd says:

    As a developer, I love the "extended menu" since i learned about it from this blog a few years ago. But i love it for selfish reasons.

    A lot of times there is a useful feature that i want to appear in the software. But i don't want the customer testing the feature to know it's there; otherwise they'll knit-pick it to death.

    So i hide the option in the extended menu. I claim i'm not hiding it: i'm using a standard Windows interface idiom.

  18. Random User 55339269 says:

    Joshua: Does your particular model not have any kind of meta (command, open-apple, etc.) key? That's always been the "Windows" key, in my experience. Or is that also mediated by a Bootcamp driver instead of by key-code? (If driver; Apple: why?!)

  19. Spire says:

    Joshua: Shift+F10.

  20. Joshua says:

    @Bart: Actually I can. Metro finally broke turning off UAC and leaving it off permanently, which we previously did except for one test machine, so nobody here would know that shortcut. If it weren't for the fact that metro is still unusable to me I'd find a way to patch the check out.

  21. Anon says:


    Disabling UAC C̶o̶n̶s̶i̶d̶e̶r̶e̶d̶Actually Harmful

    Stop disabling UAC.

    If your application doesn't work with UAC enabled, your application is broken.

  22. xpclient says:

    At least Windows 7 displays Run as admin for MSI advertised shortcuts with Shift held down. Vista didn't show it at all. Thankfully you can use Classic Shell on Vista/7/8/8.1 to open ANYTHING as administrator using Ctrl+Shift+Enter (not just shortcuts).

  23. Smeargle235 says:

    @Joshua – On a Apple keyboard, the command key sends the same scancode as the Windows key. It shouldn't require a driver for that, since it's just a USB HID (class 03h).

  24. Nico says:

    I was worried I'd get to the end of the comments without seeing anyone point out SHIFT+F10 (and you even get the extended context menu via that method).  Hooray for Spire.

  25. Joshua says:

    @Smeargle235: The Windows key was never the question.

    @Anon: Does that include builtin applications?

  26. Robert M says:

    @Joshua (cc Smeargle235): why do you need the context menu key? Shift+F10 does the same thing. Bonus points: at least in my testing, it seems to already always open the extended context menu (not sure Shift+Shift would really make sense here, anyway).

  27. Mike Caron says:

    @Joshua "Does that include builtin applications?" Yes.

    Incidentally, If your installer doesn't elevate itself, it is horribly broken and you should fire the guy who created it.

  28. Azarien says:

    Those magic shortcuts should be abandoned.

  29. Joshua says:

    @Mike: Our installer does. The installer for the apple laptop mouse driver didn't.

  30. Paul Coddington says:

    The fun begins when you discover that shortcut features for standard shortcuts are not supported for MSI shortcuts, such as Start Menu tile colour in Windows 8, or pop-up comments that remind you what a cryptically named program actually does.

  31. @Erik: I don't know about a reason but since I have never seen Microsoft releasing a single bug fix, I guess that's their policy. e.g. Windows XP logon screen's text field problem, Windows 7's icon cache corruption, etc. Probably xpclient can tell you more; although, like me, you might want to see the other half of the glass.

  32. @Joshua: You could use a Windows accessibility feature called MouseKey to make yourself a right mouse button.

  33. @Joshua: the UAC settings don't seem to have changed in Windows 8.  I just tried, and was able to disable UAC on my test machine via the Local Security Policy control panel, the same way I would in Windows 7.  (Though it really isn't necessary except in rare edge cases.)

  34. Rob says:

    @Scott Brickey: Right-click on the IE taskbar button (you get the jump list), right click on "Internet Explorer" in the jump list, then Run as Administrator.

    @Joshua: If you're using a Mac, why not just two-finger-right-click in Boot Camp?  (If you're in a VM, the two-finger and right-click areas supported by OS X will automatically be switched to right clicks in the VM).  If I read correctly that you said the Boot Camp installer didn't elevate itself, that would surprise me….

  35. Joshua says:

    @Harry Johnson: Did you try a metro app with UAC disabled? Metro actually checks and refuses to run if it had admin.

  36. DWalker says:

    Who can remember Shift-Ctrl-Enter?  That's yet another reason why I want to use a mouse, not a touchscreen.  (Besides, I want my screen to be CLEAN and not have finger smudges all over it.)  I have been trying to like Windows 8, I really have, but I have not been successful.

    Trackpads often detect heat or a fleeting touch from my wrist or palm, so that doesn't work well either.

  37. Gabr says:

    Note that Shift+F10 is not always the same as the context menu key. For example, in Win7 I just pressed Win and then "cmd". This brings up search results for "cmd", with cmd.exe selected by default.

    If I press the context menu key, I get the context menu for cmd.exe with "Run as administrator" on it. If I press Shift+F10, I get the context menu for the edit control I'm typing into (with cut/copy/paste/select all).

  38. Joshua says:

    @Gabr: Try pressing up-arrow followed by Shift+F10. You got the context menu for the editor you typed cmd into rather than the search results entry.

  39. Klimax says:

    @Fleet Command

    " I don't know about a reason but since I have never seen Microsoft releasing a single bug fix, I guess that's their policy. e.g. Windows XP logon screen's text field problem, Windows 7's icon cache corruption, etc. Probably xpclient can tell you more; although, like me, you might want to see the other half of the glass."

    Some regular nonsecurity bugs do get fixed since Windows 7. (Well observable with Windows 8, which gets patched regularly)


    "@Harry Johnson: Did you try a metro app with UAC disabled? Metro actually checks and refuses to run if it had admin."

    Correction: UAC itself is not enough. One has to change particular GPO policy to fully enable admin and only then Modern Apps cannot start.

  40. Joshua says:

    @Klimax: that's because UAC off in W8 in control panel is a lie. This is easily demonstrated. Open command prompt. It does not say "Administrator:". Do "echo > c:windowssystem32test.file". It errors out.

  41. Wayne says:

    @Joshua — Turning UAC off in a session is insufficient.  You have to turn UAC off and then reboot/logoff so that your version of Explorer is elevated.  Then when you open the command prompt it will say "Administrator", etc.

    I noticed this problem in reverse when turning on UAC.  Turning it on did nothing because my Explorer process was already elevated.  

  42. Klimax says:


    As if I didn't notice…. Although technically it is not a truth nor lie…

  43. Marc K says:

    This is an example of how Microsoft's support policy can be frustrating.  There's supposed to be Mainstream Support and Extended Support.  Mainstream support is supposed to provide bug fixes and security updates while Extended Support provides only bug fixes.  Here we have a known bug with a known fix that MS refuses to fix in Windows 7.  In reality, I think there's Mainstream Support, Sustained Engineering Support (kicks in during the Mainstream Support period when the next release starts beta testing) and Extended Support.

  44. Harry Johnston says:

    @Joshua: no, I didn't try that – but why would you want to run a Metro app from an admin account?  (For that matter, why would you want to run a Metro app?)

  45. Medinoc says:

    The big problem in Vista was removing the "run as different user" option. Unable to find it again, I've been reduced to shortcuts and batches that run RunAs. I'm glad it's back in Windows 7.

Comments are closed.