What goes wrong when you add “Copy To” to the context menu

Date:February 2, 2004 / year-entry #45
Tags:tipssupport
Orig Link:https://blogs.msdn.microsoft.com/oldnewthing/20040202-00/?p=40773
Comments:    17
Summary:Lockergnome tipped people off to this page which talks (among other things) about adding "Copy To" to the context menu. I considered adding this tweak to Tweak UI but ultimately decided against. Here's why: The "Copy to Folder" and "Move to Folder" options weren't designed to be on the context menu. They were only meant...

Lockergnome tipped people off to this page which talks (among other things) about adding "Copy To" to the context menu. I considered adding this tweak to Tweak UI but ultimately decided against. Here's why:

The "Copy to Folder" and "Move to Folder" options weren't designed to be on the context menu. They were only meant to be placed in Explorer's toolbar. (Right-click a blank space on your toolbar, select Customize, and pick "Move To" or "Copy To" from the list of available buttons.) If you add them to the context menu, you may notice that the "Copy To" and "Move To" dialogs start showing up when you really aren't expecting them, for example, whenever you double-click an attachment in Outlook.

The reason is that these two items are a bit too eager. When you ask them, "So do you handle the <X> command?" they say, "Oh yes! That's me!" This is fine in a toolbar, where the only time they're asked "Do you handle the <X> command?" is when the user clicks on the button. But in a context menu, you are asked this much more frequently, and with varying values of X.

So when Outlook launches an attachment, the shell loads up the context menu handlers and asks each one, "So do you handle the Open command?" The "Delete" option says, "Nope, sorry." So does "Cut" and "Send to" and "Sharing and Security". But "Copy To" happily says, "Oh yes! That's me!"

And then the Copy To dialog shows up when you don't want it.

Another example of what happens when you take an object and use it in a situation outside its design parameters.


Comments (17)
  1. Mike Dimmick says:

    ..and the link’s dead.

    I still use a number of old Windows 95 PowerToys, such as Send To Extensions. A lot of them actually aren’t terribly useful any more (Mail Recipient CMC, anyone??) but Send To > Clipboard As Name is very helpful, as is Send To > Command Line. I’ve not used Send To > Any Folder for a while.

    Another favourite is the Shortcut Target powertoy – right-click a shortcut > Target > Properties gets you the original item’s properties, rather than the shortcut’s. Target > Open Container is another good one.

    Any idea why the highlight text colour isn’t used on the Send To menu in XP? For me, using the Blue theme, the text remains black when the item is highlighted – it should be white, according to the colour settings.

  2. One idea for a Shell extension that I’d like to see, is the ability to resize and center a given window to 75%, 50%etc. by clicking on a node in the context menu…Any chance of seeing that soon as a Windows TweakUI or PowerToy setting?

  3. Name says:

    That sounds like a bug in the "copy to" and "move to" options to me.

  4. secretGeek says:

    "Another example of what happens when you take an object and use it in a situation outside its design parameters."

    Is that like when I took my TabletPC in the bath?

    I still blame the TabletPC.

  5. Any idea why the highlight text colour isn’t used

    >on the Send To menu in XP? For me, using the Blue

    >theme, the text remains black when the item is

    >highlighted – it should be white, according to

    >the colour settings.

    Mine is that way too; my only guess is that their adding the icons to the menu has something to do with it–being owner-drawn and getting the text color wrong, maybe?

  6. Raymond Chen says:

    Robert: Yup, the mismatchedcolors is just plain a bug in the SendTo menu. I’ve asked the SendTo folks to look at it.

  7. Raymond Chen says:

    Sean: Window size and position is not something a context menu should be messing with. A context menu should operate on the item you clicked, not on some enclosing UI element. (After all, what if the context menu is being invoked programmatically by WinZip? You don’t want it to run around messing with WinZip’s windows, do you?)

  8. Guido says:

    Any idea why the highlight text colour isn’t used

    >on the Send To menu in XP? For me, using the Blue

    >theme, the text remains black when the item is

    >highlighted – it should be white, according to

    >the colour settings.

    Xp, working fine here

  9. Centaur says:

    So when Outlook launches an attachment, the

    > shell loads up the context menu handlers and

    > asks each one, "So do you handle the Open

    > command?"

    Isn’t it actually a good side effect that, instead of opening the attachment, it forces the user to save it somewhere where it will supposedly be checked by an antivirus monitor?

  10. Edward says:

    Any chance of a context menu item to send files via Bluetooth? The XP SP2 beta has a Wizard fsquirt.exe but it’s too many steps.

    Start -> Programs -> Accessories -> Communications -> Send Files over Bluetooth -> Next -> Send file -> Next -> Select Device -> Next -> Select File -> Next -> Sending…

    Vs

    Right-click on file -> Send via bluetooth -> Select Device -> Sending…

    Also you seem to need to start the Wizard to be able to recieve files.

    How about always allowing file transfers from paired devices and poping up a baloon notification to accept transfers from non-paired devices?

  11. Raymond Chen says:

    You’ll have to ask the Bluetooth folks. Of course you can always try to write one yourself…

  12. Teresa says:

    Hi,-Mr.chen!-Im-Rick-Schauts-eldest-daughter-(which-explains-the-broken-spacebar,-delete,-and-apostrophy-keys.-Im-working-on-his-old-laptop.-I-swaer,-the-first-thing-he-did-when-he-got-it-was-he-dropped-it.)-and-I-couldnt-help-but-laugh-at-the-screenname-lockergnome.-I-was-wondering-where-I-put-my-homework…

  13. what about the conext menu that only appliesw to the windows tool bar? the one that has options for "move, maximize, minimize" etc.

    That seems like a perfect place for it…

  14. Raymond Chen says:

    Commenting on this article has been closed.

  15. Marc Orchant passes along a tip from PC Magazine that explains how to edit the registry to add &amp;ldquo;Send&amp;rdquo; and &amp;ldquo;Copy&amp;rdquo; commands to Windows Explorer&amp;nbsp;and concludes with this comment: After performing this tweak, you&amp;rsquo;ll have two new context menu commands: &amp;ldquo;Move to Folder&amp;rdquo; and &amp;ldquo;Copy to Folder&amp;rdquo;. Apparently this stuff…

  16. I just saw this blog post and I thought I would share it with all of you.&#160; It add this to your right-click…

Comments are closed.


*DISCLAIMER: I DO NOT OWN THIS CONTENT. If you are the owner and would like it removed, please contact me. The content herein is an archived reproduction of entries from Raymond Chen's "Old New Thing" Blog (most recent link is here). It may have slight formatting modifications for consistency and to improve readability.

WHY DID I DUPLICATE THIS CONTENT HERE? Let me first say this site has never had anything to sell and has never shown ads of any kind. I have nothing monetarily to gain by duplicating content here. Because I had made my own local copy of this content throughout the years, for ease of using tools like grep, I decided to put it online after I discovered some of the original content previously and publicly available, had disappeared approximately early to mid 2019. At the same time, I present the content in an easily accessible theme-agnostic way.

The information provided by Raymond's blog is, for all practical purposes, more authoritative on Windows Development than Microsoft's own MSDN documentation and should be considered supplemental reading to that documentation. The wealth of missing details provided by this blog that Microsoft could not or did not document about Windows over the years is vital enough, many would agree an online "backup" of these details is a necessary endeavor. Specifics include:

<-- Back to Old New Thing Archive Index