Why can’t you programmatically reorder the items on the Start menu?


The classic Start menu and the "All Programs" portion of the Windows XP Start menu permit you to customize the order of the shortcuts that appear there. You can use drag/drop to rearrange them, or force them to be sorted by name. But why is there no programmatic interface to these actions?

Because the power would be used for evil far more than it would be used for good.

As noted before, the Start menu is highly contentious screen real estate. If a programmatic interface were given to the order of the items on the Start menu, programs would just use it to force their shortcut to the top (and possibly demote their competition). Once you accept that programs will be doing this to the Start menu, the ability for the user to reorder the items would be lost since programs would just override the user's preferences with their own.

Comments (47)
  1. Lionell Griffith says:

    I am shocked.  You don’t trust programmers.  

    Apparently you know more than three programmers.  As near as I can tell, the vast majority of programmers view that simply being able to do something is adequate justification for doing it.

  2. Cody says:

    Why not allow a user override option?  Or an option to order based on use frequency, similar to the Add/Remove Programs heuristic?

  3. Jorge Coelho says:

    I quite understand the reason not to allow programs to do this
    (unfortunately some unscrupulous software authors would abuse the
    previledge), however I also happen to think that if you start applying
    this approach everywhere, pretty soon you won’t be able to do ANYTHING
    programmatically. Flexibility goes out the door!

    As an author of software that customizes the way windows looks and
    works, I run into this barrier quite often. What I want to do is
    actually in the INTEREST of the user (and by his request) but I can’t
    because there is no API to do it. In cases such as this, you are
    actually doing a diservice to your customers.

    So why not just PROMPT the user with ‘Program X is trying to do
    this. Allow/Deny?’ and provide the user with a checkbox never to ask
    again for that program? Vista is not shy of prompting the user for
    every little thing that might require Admin previledges, after all…
    ;-)

    [“Provide the user with a checkbox never to ask again for that program.” And programs will find out where that checkbox is stored and set it programmatically, thereby suppressing the prompt. (See: Autoplay.) You’ve protected nothing. -Raymond]
  4. James McKay says:

    I’d have thought that if someone were that unscrupulous they’d find a way to do it programmatically even though there is no documented way of doing so. Hackers and virus writers do that kind of thing all the time.

  5. Lex says:

    So why not just PROMPT the user with ‘Program X is trying to do this. Allow/Deny?’

    Wow I read the article and thought – yeah ok no-brainer but reading the comments already…

    The goal is to have less confirm dialogs not more – I take your comparison of UAP as a joke but frankly it’s bad enough programs desparately loading out Quick Launch, system tray, folder and the desktop with launch icons let alone trying to force there way up on the main start bar.

  6. Neal C says:

    Jorge: "So why not just PROMPT the user with ‘Program X is trying to do this. Allow/Deny?’"

    As history has shown (with the warnings about driver signing), the program will simply click "Allow" on your behalf.

  7. Mark Sowul says:

    Incidentally, going back to programs spamming quick launch et al, I sure wish Outlook didn’t feel the need to do that EVERY TIME I INSTALL AN UPDATE.

  8. Jim says:

    The Visual Studio toolbox has a related problem. Bring up the Choose Toolbox Items dialog box, click COM Components and see this at the top of the list.

    ":-) VideoSoft…"

    Who are these jerks, great name for their component.

  9. PatriotB says:

    "the program will simply click "Allow" on your behalf"

    I would expect this to not be possible anymore with Vista, what with UAC, mandatory integrity levels, and the Secure Desktop… Hopefully :)

  10. Jack says:

    This was a good decision. I am a programmer.

    Can anyone complaining please tell me why would I would need an API to rearrange the start menu?

  11. Jonathan says:

    Mark: Even worse, Outlook makes itself the default mail client after every update. Very annoying if you want to use a different program. Of course, you can just uninstall it, but that’s no excuse for bad behavior.

  12. Gabe says:

    Jack, you would need an API to rearrange the Start menu if you wanted to write a program to rearrange the Start menu for the user. It seems obvious to me, at least. The OS lets you sort by name or drag-and-drop. If I want any order other than by name with folders first, I have to drag the items one-by-one. I’d like to write a program that keeps the folders at the end of the list.

    Another thing I’d like to do is write a program to enforce a set order on all of the computers in my department. That way I can make sure that all of the programs that people use daily are right at the top in the same order on every computer. To do this now I have to walk to every machine and manually drag the items into order on each one.

  13. Leo Petr says:

    Gabe, why don’t you just put those programs in the area above the separator line (one folder up from the Programs folder). Windows Update usually resides there, and it’s sorted separately from the stuff below the dividing line.

  14. IanA says:

    We should  understand that Users (and their wishes) are not always paramount. Quite often, in a Corporate environment for instance, the User is not your customer (as a Software Vendor) the Corporation is.

    Will a Corporation wish to specify the order of items on the Start Menu? Maybe…

    There is a fair bit of software written to stop Users doing things they shouldn’t. Who decides the limit of this, you? me? or the customers?

  15. mikeb says:

    There is a technical solution to Jorge Coelho’s problem, but it involves significant complexity  (including bureaucratic complexity) and the very real likelyhood that Microsoft would, yet again, be branded an onerous monopolizer for enforcing the solution:  have Microsoft (or a designated third party) sign applications that are permitted to make these kinds of changes.

    This might be handled in a manner similar to the way driver signing is accomplished.

    I’m not suggesting that this is something MS needs to fix – just pointing out that a solution exists, if the desire for a solution is greater than the cost of providing it.

  16. Reinder says:

    Back in the DOS days, you couldn’t programmatically change the order in which ‘DIR’ listed files either, but there was a simple workaround: remove all items from a directory, then move them back in in the desired order.

    I would guess that this might work for the start menu, too.

  17. Jonathan Payne says:

    I think this is the wrong way to approach the problem.  Windows already allows software to do lots of anti-social things – I could make my application run on startup or stick my application icon in every possible location (quick launch, desktop, send to, start menu etc).  Most applications are well behaved because customers will choose to avoid applications that break the rules (for example, a lot of people avoid a certain media player because it has a habit of installing a lot of annoying extra content).

    By trying to enforce these requirements through not supplying APIs just annoys users with a legitimate use for them.  In this case, one situation that comes to mind is a locked down environment where an IT department what to make sure all the icons in the Start Menu occur in a particular order (to make training easier).

    This issue also comes up a lot on Pocket PC devices where, for some applications, a customer buys a lot of devices and requires them to be locked down so the user can only see certain parts of the UI.  Pocket PC does a few things that make it hard to lock down devices.  This might stop some unscrupulous developers from breaking the UI rules but also makes life more difficult for other developers.

  18. Jerry Pisk says:

    I don’t get the request to do it though. What application would have the need to reorder the start menu? Why? Start Menu is not part of any application, so why should one feel the need to change it?

  19. There seems to be a common fallacy in these discussions.

    When discussing the lack of an API and why it is a Good Thing, "Why not provide an API and place a gateway dialog on it?" is always met with "The program will muck with the dialog."

    But why is there an API for the dialog?

    It seems to me that given the choice between "no API for start menu sorting" and "no API for security dialog automation", the latter is already desirable anyway. We don’t want program X to try something nasty and programmatically click "Allow" on the resulting security dialog. That would be broken security, wouldn’t it?

  20. CoqBlog says:

    Si vous vous êtes toujours demander (ou si vous venez seulement de vous le demander en lisant ce…

  21. Lionell Griffith says:

    There is a workaround.  

    Install program A in program group A and you will go to the top of the list.  Alternatviely, you could switch to using Z’s and go to the bottom of the list.  Unfortunately, all your competition has to do is use more A’s or Z’s. So you can’t win.

    See yellow pages for countless examples of A and Z competition.

    I really think its best to leave it as it is.  Especially since  cascade menus are a bloody pain to use when you have more than 10 things and more than two levels in it.

  22. Cody says:

    Actually a politician (running for a city or township position) changed his last name to start with ‘AA’ or ‘AAA’ (Can’t remember which) to be at the top of the ballot.

  23. Jorge Coelho says:

    Neil: "the program will simply click "Allow" on your behalf"

    Ok, but that is an extreme case and the user, seeing this, can always uninstall the mis-behaving program. This is, in a way, similar to all those programs who put themselves in the Windows notification area (aka ‘systray’ :-): most of them, if not all, give you an option NOT to do this or to remove their icon from that area – and the few that don’t, I promptly remove from my system.

    You can trust *most* developers not to do something that will go against the user wishes, and the user to remove those programs that stubbornly do what you don’t want them to. The proof of this is that we do NOT have 1 mile long notification areas, although every program is free to put their icon there.

  24. Ryan says:

    "The proof of this is that we do NOT have 1 mile long notification areas, although every program is free to put their icon there. "

    Have you ever seen the default OS install from a vendor like Dell? We *do* have mile long notification areas, and most users aren’t proficient/patient enough to click through and disable every single icon. Not to mention spyware/adware that is difficult or impossible for a novice user to uninstall.

  25. Gene says:

    > You can trust *most* developers not to do something that will go against the user wishes

    No. You can’t. If a dev is getting poked by his manager that he *will* put their program at the top, he’ll do it.

    > the user to remove those programs that stubbornly do what you don’t want them to.

    Uh. No. If the user didn’t need the program, he wouldn’t have installed it (excluding all the crap that comes with a new Dell)

    It’s even worse because now you’ve got to put up with the bad behaviour because you need the program to do stuff.

    Look at all the people complaining about Outlook, which they (some of them) need to have so they can do email.

    It’s like having to have Flash so that menus work in a website, and having to put up with all the bouncy animated annoying crap that comes along with installing Flash.

  26. "have Microsoft (or a designated third party) sign applications that are permitted to make these kinds of changes."

    This then excludes small-time developers (eg: shareware authors) from the game, as happened with Microsoft Office development, because few people outside a corporation can afford the hideously overpriced annual certification fees.

  27. "Especially since  cascade menus are a bloody pain to use when you have more than 10 things and more than two levels in it."

    I have countless things in My Start menu, all easily and quickly accessable (many of them custom scripts, not just programs).  It comes down to being organised for me (arrange things by task using the 7+-2 rule for every level).

    Try doing the same with Vista’s menu, it is much much harder to navigate quickly, as Vista has destroyed the concept of instantly viewable hierachy.  The search function is useless for a complex menu because not all shortcuts have unique names (and they would be too long to display properly if they had).

    In short, designing a good Start Menu is not easy and I haven’t seen anything better for my workspace than what we have now.  Wis coming is, IMO, designed for disorganised people with few programs installed.

  28. Mihai says:

    I wonder how difficult is to reverse-engineer the keys in HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerMenuOrder

    if one really-really wants to :-)

    Not that I think is a good idea.

    But if we are here, why allow applications to set the run from …SoftwareMicrosoftWindowsCurrentVersionRun?

    Start/Programs/Startup (which is visible) is not good enough for them?

  29. Dave says:

    Well, since the user can rearrange items and the system must remember that order, all you have to do is find and reverse-engineer the data that the OS stores. If you Google for MenuOrder you will find that people have already done that. I’m not sayin’ it’s right, I’m just sayin’ it’s been done. So there *is* an API, it’s called RegSetValue. :)

  30. Ray Trent says:

    This wouldn’t be *all* that hard to solve (technically speaking) on Vista: just make the settings for such a "don’t show this confirmation dialog any more" dialog require admin privs to change.

    Then the offending app couldn’t just undo the user’s selection (but, sadly, that would mean the user would have to encounter UAP if they chose that option… you can’t have everything, where would you put it?).

    It’s pretty justifiable in this case, apps that change stuff like this without the user’s permission are essentially acting like spyware unless that’s the primary function of that app (e.g. some kind of skinning app).

  31. Norman Diamond says:

    And programs will find out where that

    > checkbox is stored and set it

    > programmatically, thereby suppressing the

    > prompt. (See: Autoplay.)

    But Autoplay is already broken, whether or not third-party programs are added.  TweakUI helps relieve a lot of the pain, though it doesn’t fix the underlying breakage.

    Monday, June 19, 2006 11:31 AM by Jack

    > This was a good decision. I am a programmer.

    > Can anyone complaining please tell me why

    > would I would need an API to rearrange the

    > start menu?

    Jack, you and I don’t need that API because you and I are programmers for things that don’t do theming.  But programmers who do want to assist end users in doing theming, or who want to assist corporate IT departments in doing theming for their companies, or who want to assist OEMs in doing theming for their appliances, those are the programmers who need this kind of API.

    Monday, June 19, 2006 1:19 PM by Dave

    > Well, since the user can rearrange items

    (except when prohibited by a setting ^_^)

    > and the system must remember that order,

    Wanna bet?

    Monday, June 19, 2006 1:21 PM by Reinder

    > Back in the DOS days, you couldn’t

    > programmatically change the order in

    > which ‘DIR’ listed files either, but there

    > was a simple workaround: remove all items

    > from a directory, then move them back in in

    > the desired order.

    > I would guess that this might work for the

    > start menu, too.

    I’ve seen one or two programs that use the same trick to arrange the task bar the way the user wants it too.

  32. Norman Diamond says:

    Just saw Mihai’s posting after submitting my previous one.

    > But if we are here, why allow applications

    > to set the run from

    > …SoftwareMicrosoftWindowsCurrentVersionRun?

    > Start/Programs/Startup (which is visible) is

    > not good enough for them?

    That depends on the application.  Antivirus programs, firewalls, and their opponents (malware) need the Run key.

  33. Jim Bim says:

    I used to be able to reorder the start menu in W2K but that seems to have gone away in WXP.  At least in the menu directly over the start button.

  34. Cooney says:

    > This wouldn’t be *all* that hard to solve (technically speaking) on Vista: just make the settings for such a "don’t show this confirmation dialog any more" dialog require admin privs to change.

    How many people wil be running Vista as admins?

  35. I can understand why it is not good to allow programatic reordering, but I remember when I wished you could at least do "sort alphabetically" programatically.

    A number of years ago, we used our own software deployment tool in a couple of large corporates. Whenever new software shortcut was advertised it would go to the bottom of the list (when the existing items where likely to be sorted) so we would get lots of calls from people who thought that they hadn’t received it at all because they assumed the wole list was sorted.

    We eventually worked around it by deleting HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerMenuOrder – not pretty I know :)

  36. m says:

    Why does Microsoft make it so damn hard to use the same desktop settings on multiple computers?  It pisses me off how many problems there are with it.

  37. Jorge Coelho says:

    [It’s not deliberately obfuscated. It’s just naturally obfuscated. -Raymond]

    Hehe. Granted, for some things, which still doesn’t invalidate my point. :-)

    But other things are deliberately obfuscated – the MRU programs list in the Registry is deliberately encrypted using ROT13, for instance. Easy to break encryption, but kind of proves the point…And yes, I remember you discussing this issue before. :-)

  38. GregM says:

    "I’ve seen one or two programs that use the same trick to arrange the task bar the way the user wants it too."

    I use one of those programs.  :)

  39. Cheong says:

    Reading this, I’m always in question why there isn’t a confirm dialog function that other Windows program cannot directly send messages to(Maybe the system itself will prevent other programs from getting the HWnd or simply refuse relay the message to the dialog)… it’ll be good for the use of those security dialogs.

  40. Norman Diamond says:

    Monday, June 19, 2006 9:34 PM by Jorge Coelho

    >> [It’s not deliberately obfuscated. It’s

    >> just naturally obfuscated. -Raymond]

    >

    > But other things are deliberately obfuscated

    > – the MRU programs list in the Registry is

    > deliberately encrypted using ROT13,

    That’s only partly obfuscated.  If a filename contains a mixture of Chinese, Italian, and native Japanese characters, only the Italian characters get ROTted.  In this case the only thing more obscure than the security is the security policy.

  41. Jorge Coelho says:

    Mihai: “I wonder how difficult is to reverse-engineer the keys in”

    Mihai, and others who suggested several other ways to solve this problem, of course you can always use some kind of a ‘hack’ (this is what I do to read the ‘Recent Documents’ list and the MRU programs list, for instance) but:

    This is not officially supported by Microsoft and, as such, can change from Windows version to Windows version, or even service pack to service pack. It’s the kind of thing Raymond Chen frowns upon, and with reason.

    For instance, with Win9x it was easy to display a Recent Documents menu: just show the contents of the special Recent Documents folder. Then in Windows 2000 Microsoft changed the rules and this folder would suddenly held HUNDREDS of shortcuts. To solve this problem you had to go to an undocumented Registry key and find the actual list there. With XP, the structure of this list changed yet again.

    Now, don’t you think that a program whose purpose is to replace the actual Windows Start Menu, or use an alternate way to display the information in it, has a legitimate purpose in wanting to know what the Recent Documents list is? And the MRU Programs list?

    This are just examples, the same way that re-ordering the contents of the Start Menu is an example: don’t hold on to it alone, think on a broader scale (glad some people suggested some uses for the re-ordering of Start Menu items, I actually could think of none, hehe).

    Another example is the systray: if there was some kind of API to it, I would have been able to replace the systray with a much improved version a long time ago (one where the *user* could select the icon size he wants, specify custom icons, select which icons appear and which not – the later was implemented by MS in XP, but I could have added this to Win9x if only there was an API to deal with the systray).

    Instead I had to come up with ugly ‘hacks’ to capture the Windows systray into my application and render the background transparent, etc… And yes, I know how I can actually make my own replacement, but it involves running a service at start-up, etc…

    Not trying to plug my own software, but, for instance, because it is actually easy to replace the Windows tasklist (you simply hide the real Windows taskbar and do your own windows enumeration) I am able to improve on it over what Microsoft has done so far: I can provide task snapshots in XP, the user can re-order tasks by drag & drop, specify which tasks appear on the tasklist and which not, customize icons for specific programs, specify the size of icons on the tasklist, specify which mouse click does what – and I could go on…).

    What I am trying to say is that if all this stuff was documented and Microsoft provided APIs for this instead of actually doing the opposite (i.e.; deliberately obfuscating the little information that is actually there) 3rd party software could actually build on the existing Windows functionality and add to it.

    Having an open architecture is what made the PC great. When Microsoft deliberately obfuscates information, it is doing something akin to what IBM tried to do with the MCA bus, i.e.; lock the user into a proprietary way of doing things. And it forces 3rd parties to use undocumented hacks.

    Obviously, all said and done, Microsoft still has to be very careful with things that might compromise the security of the system – but surely this is not it.

    [It’s not deliberately obfuscated. It’s just naturally obfuscated. -Raymond]
  42. meno says:

    Personally I think all theming, skins, and similar customizations should be done away with and all users and writers of suck crap should be taken out and executed.

  43. Jorge Coelho says:

    Meno, don’t like it, don’t use it… and leave the rest of us alone, enough executions and death going on in the world already. :-)

    Also, just because a program is skinnable, doesn’t mean it doesn’t offer functionality enhancements as well (shameless plug: Winstep applications focus on usability enhancements *and* they also happen to be skinnable).

    I bet you used WinAmp for a long time as an MP3 player – and WinAmp is basically THE program that gave birth to the skinning movement.

  44. XrX says:

    I don’t have a problem with skinnable programs, just so long as they allow you to turn OFF tha damndable skins, I don’t need fancy bells and whistles eating up my clock cycles, I want it lean and mean (Eye candy doesn’t improve my productivity one iota.)

  45. Jorge Coelho says:

    XrX: "Eye candy doesn’t improve my productivity one iota"

    But sells, and everybody loves a beautiful thing. I fully agree, however, that when it comes down to it it’s the performance/functionality that really counts. Now, if you can get the two together (and that has always been my goal) then you can have your pie and eat it too. :-)

  46. me says:

    Like "Windows Update", "Activate Windows" and "Set Program Access and Defaults" that automatically appear on top of the Start menu?

    Oh, and I think Microsoft should add some trick to automatically destroy these stupid ‘Uninstall $program" entries from the start menu.

    Didn’t the Add and remove programs dialog come with Windows 95?

Comments are closed.