Windows ConfidentialDetermining What Is Frequently Used
Click the Start button and up pops the Start menu. On the left-hand side is a list of programs. How is that list of programs chosen? We started with the general principle that programs you’ve recently run most often are the ones that should show up on the front page of the Start menu. Keeping this principle in mind, we soon found it was necessary to do some fine-tuning.
The basic rule is that each time you launch a program, it earns a point. Conversely, the longer you don’t launch a program, the more points it loses. The Start menu shows the programs that have the most points. Simple, right? This is not the part of the selection algorithm that confuses people. After the basic rule is applied, the fine-tuning kicks in, and that’s the part that people find most puzzling.
Before we go into the fine-tuning, there are some things that aren’t obvious from the basic rule. Notice that the rule talks about launching programs, not shortcuts. Some programs install multiple shortcuts, and it doesn’t matter which shortcut you use to launch a program. If they all point to the same executable, then that program accumulates all the points earned through the different shortcuts.
Start Menu(Click the image for a larger view)
This also means a program can earn points even if you don’t use the Start menu to run it, as long as you run it from Explorer. If you run a program manually, say by opening the folder and double-clicking the executable, it still earns points and can eventually be promoted to the front page of the Start menu.
Now, once a program earns enough points to make it to the front page of the Start menu, Windows® has to decide which shortcut icon to show if there is more than one shortcut pointing to the program. Not surprisingly, ties are broken in favor of the most frequently used shortcut.
As part of the fine-tuning, certain programs are filtered from the list. For example, a program that you’ve pinned to the Start menu will not appear because there’s no point in showing you two icons for the same program. After all, you pinned the program to your Start menu because you run it often.
Another fine-tuning step filters out noise. Many programs were showing up because they were shortcuts to common helper programs like Notepad or Wordpad—such as a shortcut to display a Read Me file. These shortcuts needed to be filtered out so they wouldn’t be nominated as, say, the Notepad representative. Incidentally, a program can register itself as not eligible for inclusion in the front page of the Start menu by creating a NoStartPage value in its application registration.
The basic rule also didn’t account for a program that you launch once and keep running all the time. According to a strict interpretation of the rule, this program would earn a point when you launched it and then lose that point over time. (In this case, "frequently" is an astounding understatement for "all the stinking time!") So we added another rule: for each consecutive day a program is kept running, it earns a point. This is enough to keep the program afloat in the points race, but not so much as to overwhelm the programs that you actually launch. After all, if you keep the program running all the time, you don’t need to launch it frequently.
In Windows Vista™, a few additional fine-tuning rules were added. For example, when choosing among candidate shortcuts for a program that has never been run from the Start menu, a shortcut with no command line parameters is now preferred. And the program you ran most recently will always appear on the list, regardless of its point count. Raymond Chen’s Web site,
The Old New Thing, and identically titled book (Addison-Wesley, 2007) deal with Windows history and Win32 programming. His call is important to you and will be answered in the order it was received.
© 2008 Microsoft Corporation and CMP Media, LLC. All rights reserved; reproduction in part or in whole without permission is prohibited