Holding down the shift key when right-clicking lets you pin things to the Start menu even when you might have been better off not doing so


Holding the shift key when calling up a context menu is a convention for indicating that you want to see additional advanced options which are normally hidden. One of those options is Pin to Start menu. What is this doing as an extended command?

The Pin to Start menu command normally appears on the context menu of a program or a shortcut to a program. The Start menu pin list was intended to be a launch point for programs, so if the item you pick isn’t actually a program, the Pin to Start menu item will be hidden. Furthermore, only items on the local hard drive will show Pin to Start menu. This avoids ugliness if the user accidentally pins a file on a network drive or removable media, and the network is down or the removable media is removed. (Or, if the removable media is a floppy drive or CD-ROM, freaking out the user by spinning up the drive to get the properties of the shortcut.)

The shift key override was aded as an escape hatch, like the double-Ctrl+Alt+Del, in case there was some situation discovered after Windows XP shipped where it would be reasonable to pin a non-program or a shortcut on network or removable media to the Start menu. For example, ClickOnce application are not recognized as executables because their extension is not .exe but rather is .appref-ms. But you can use the shift key override to pin them to your Start menu.

With great power comes great responsibility: If you manually override the Pin to Start menu logic, then it’s your problem if you pin something that ends up making your life miserable.

Update: Upon closer examination, I’ve discovered that my characterization of what the shift keys accomplishes was incorrect. The shift key does not let you force-pin files on the network or removable media. It only lets you force-pin files that aren’t programs.

Comments (20)
  1. Stuart says:

    I have an exe on a network drive that I've been trying for ages to figure out how to pin (to the taskbar, actually, not the start menu, but…). When I saw this blog post I thought "Aha! My problem is solved!" But it doesn't seem to work – even when I shift-right-click, there's no "pin to " anything option. I tried right-clicking the exe itself, a shortcut to the exe, and the taskbar button for the application window when it was open. No pin options. Clearly I'm missing something…

  2. Chriso says:

    The extended context menu is a real secret. One day when i was looking for a way to run a program under another user (not administrator though) on Windows 7, i discovered that "Run As User…" was gone from the context menu, even the help file just told me that it's gone. Only through a coincidence i found out that when you shift click on a entry you get something like that back. Yes i know there is still the runas command line tool, but left clicking on something is more convenient on Windows.

    Thank you for the post, explaining why the shift key override was added. :)

  3. Vilx- says:

    +1 Stuart! Btw – there is a workarond. Pin a local program to the taskbar, then close it, then right-click the taskbar icon and right-click again on the program name. Choose properties and from there you're in business.

    However this will leave the icon of the local program in the taskbar. To work around that, you have to create a shortcut somewhere to the local program, change the icon of the shortcut, then start the local program via that shortcut, and from there follow the previous workaround.

    I sure wish there was an easier way for doing this – I don't think it's so uncommon that some homebrew application which is often used resides on a network share.

  4. Matt says:

    I'm looking for the best way to make Windows 7 show the Command Prompt option on a simple right-click, rather than having to press shift every time. Any idea what I need to change in the registry?

    Also, how can I add my own commands for specific file types, such that they show up only on shift right-clicking?

    Off-topic: Raymond, what's up with April's Windows Confidential in TechNet (technet.microsoft.com/…/gg981675.aspx)? The first paragraph seems to have been truncated.

  5. James Schend says:

    I can't speak for the Windows team, but I imagine they try to discourage users from running programs from network drive for a lot of good reasons. (Running an installer from a network drive is one thing; a program you use every day another.)

  6. Daniel says:

    Ah, I was wondering why Elf didn't store the icon in the binary but PE did.

  7. gary says:

    @matt

    download the ultimate windows rweaker and click on additional tweaks

    http://www.thewindowsclub.com/ultimate-windows-tweaker-v2-a-tweak-ui-for-windows-7-vista

  8. jader3rd says:

    Since discovering "Copy as Path" and "Open Command Window Here" I've noticed that I press shift when bringing up the context menu more than not. I generally find the context menu to be full of options that I never/rarely use, especially as time goes on and different applications add their own menu items to the context menu. Is there a way to configure which menu items appear by default in the context menu, and which ones will appear only when I press shift? That way I can pull "Copy as Path" and "Open Command Window Here" into the main explorer context menu, and require pressing shift to see all of the other ones.

  9. Ian Yates says:

    (Note: I haven't tried this…) You could always use mklink to create a symbolic link to the folder on the network that has your program.  As far as most apps are concerned, it will be a local path.  I've had to use it to fool some line-of-business installers that insist on some strange locations for folders when applying patches, despite allowing (and sometimes recommending) that you install to different folders in the first place!

    mklink /D c:myLinksMyNetworkApp \serverShareMyNetworkApp

    Maybe with offline files and a few other tricks it will still behave nicely when your network isn't available.  I can't be bothered trying it out now (and don't feel like breaking things at the moment) but if someone else did that'd be great :P

  10. Matt says:

    Ok, so I got the Command Prompt option to show up always by deleting the "Extended" REG_SZ value from 3 locations, namely, HKCRDirectoryBackgroundshellcmd, HKCRDirectoryshellcmd and HKCRDriveshellcmd. Did I miss any? I also added /edited the appropriate runas keys with the "Extended" value to display an Elevated Command Prompt option only on pressing shift. Thing is, now on pressing shift I see *both* options, i.e. Command Prompt and Elevated Command Prompt, whereas I want only the latter to show up. So is there a counterpart to "Extended" (or some value I can set it to) that will cause a menu option to *not* show up on pressing shift? Can anyone help?

  11. Cheong says:

    By the way, for those who really want to have ability to pin up things, they may create a folder to store the items and turn it into a toolbar. Then uncheck "Show Text" and "Show Title" to achieve similar effect.

    It'd be nice if Win7 can allow user to "undock" individual toolbar to other side, or even better, other window.

  12. Troll says:

    I think MS introduced the Extended value (Shift required) because the context menu was starting to get too cluttered with just few programs installed. Unfortunately, they put all the wrong and frequently needed options in Shift required category.The ideal solution would have been to introduce a GUI to configure which items you want to see in regular menu and which one with Shift pressed (Windows 8, Microsoft?). A GUI to manage context menu verbs (added thru both registry and shell extensions) is desperately needed.

    As if hiding things in the context menu isn't bad enough, now MS has started hiding them with some modifier key required for the Windows 7 taskbar as well. Just displaying the much required context menu for a pinned taskbar app requires Shift because their latest cool whiz-bang jump list feature wanted to take over the context menu! Not only is requiring some modifier key like Shift bad for discoverability, it's very poor usability. Stop doing this please. If 7 Taskbar Tweaker didn't allow me to make right click on the Windows 7 taskbar show the good old context menu without pressing some stupid Shift key, I would have dumped Windows 7 right then and there. MS is fooling around with users' muscle memory of right clicking on programs on the taskbar.

    I also wish double Ctrl+Alt+Del complete with real Classic logon was back in Windows 8. Winlogon has been dumbed down because you can't log into a hidden user account any more while still normally using the Welcome screen for convenience most of the times. You can only either make all user account names hidden or use the Welcome screen for all.

    [Configuration of extended verbs is not possible due to the way they are implemented (CMF_EXTENDEDVERBS is processed in code rather than declaratively). And you can log into hidden accounts by clicking "Other user". -Raymond]
  13. For those who want to edit which menu items require pressing Shift, you can use NirSoft's ShellMenuView: nirsoft.net/…/shell_menu_view.html

    You can right click on a menu item and choose "Set Extended Mode" to require Shift or "Remove Extended Mode" to not require shift.

  14. Jeff says:

    Not only is "Pin to Taskbar" hidden if the target is not a program or if it resides on a network path, the option is also hidden if the shortcut's name matches a hardcoded list of keywords.  I've noticed "Documentation", "Readme", and "Uninstall" are such keywords — there are probably more.  Since I like to PTFM (Pin The "Fine" Manual), my workaround is to rename "Documentation" to "Docs" in the name of the shortcut.

    You can see this effect for yourself by creating a shortcut to calc.exe named "Calc Readme" and trying to pin it to the taskbar.  (Amusingly, Microsoft actually HAS dutifully created a readme for calc:  windows.microsoft.com/…/Using-Calculator-in-windows-7  ).

    [Not hard-coded; language-dependent. And it's probably the same list that's used for the Start menu. -Raymond]
  15. Robert says:

    So there really is no (easy) way to pin programs on removable drives to the start menu/taskbar? Darn.

  16. Pete says:

    I wasn't aware of the extended context menu until now, there is some pretty useful commands on there. I guess there are a lot of people unaware of it just like the left click safely remove hardware menu as everyone is used to right click for a menu.

  17. Troll says:

    "Configuration of extended verbs is not possible due to the way they are implemented (CMF_EXTENDEDVERBS is processed in code rather than declaratively)."

    Certainly a GUI to add or remove the "extended" value from the registry per verb is possible i.e. do what ShellMenuView does.

    "And you can log into hidden accounts by clicking "Other user".

    On a workgroup joined PC, you can't log into hidden accounts by clicking "Other user… *while the Welcome screen is enabled*". The "Always Use Classic Logon" needs to be enabled to be able to log in as other user but then the convenience of clicking on a user name and typing JUST the password is lost. Or you need to be joined to a domain. That ability was last present in Windows XP (have the Welcome screen enabled normally, but Ctrl+Alt+Del twice to logon to a hidden user account where you have to type both user name and password).

    [Fiddling the Extended value works only for certain types of verbs. Are you saying Windows should have a feature that you know ahead of time will work only some of the time? (And sorry about the non-domain-joined case.) -Raymond]
  18. Matt says:

    gary – "download the ultimate windows rweaker and click on additional tweaks"

    Thanks gary, but I stay miles away from all such 'tweakers'. As mentioned above, I did it manually by editing the registry, such that "Open Command Prompt Here" shows up always, and "Open Elevated Command Prompt Here" shows up only on pressing Shift. I wanted them to be exclusive though, i.e. "Open Command Prompt Here" should *not* show up on pressing Shift, however that doesn't seem to be possible I guess (unless someone knows better and can help me).

  19. Some Guy Up North says:

    Thanks for this, Raymond; are there other resources which might explain a few other oddities about the Pinning system under Windows 7?

    I have one app I use that doesn't give the option to pin to either Start Menu or Taskbar (except via the Shift context menu – and then only for Start Menu), but it's not on the network – it's stored locally under Program Files (x86), but the shortcut is for an installed program so I'm not 100% clear what is being run. I believe the app calls a VBS script which runs an updater, and then only once the app is confirmed up-to-date does it run the real app.

    I have another app that is similar, but is written in Python; attempting to pin that to the Taskbar results in pinning a link only the Python executable, and not the parameters which are appended to call the actual app; it's as though it treats the Python code being run as a document, which means I need to run it from the Recent Documents pick-list instead. Not exactly what I want it to do, but I may be out of luck on that one, I think.

  20. boomie says:

    Why this kind of things are not in FAQ/some guide is a mystery to me. There are eleven hundred thousand of these things that are not in a plain sight, yet are not documented anywhere, like shift+space combination in browser.

    [I think you answered your own question. How do you put eleven thousand things in plain sight? Nobody would read it because it's eleven thousand pages long! -Raymond]

Comments are closed.