How does Add/Remove Programs get the size and other information?

Date:July 9, 2004 / year-entry #274
Orig Link:
Comments:    120
Summary:If the program doesn't provide this information itself, Add/Remove Programs is forced to guess. The problem is that there is no "obvious" way to map an entry in the Add/Remove Programs list to an actual program. Each entry in the list, for those who care about such things, comes from the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall registry key. The...

If the program doesn't provide this information itself, Add/Remove Programs is forced to guess.

The problem is that there is no "obvious" way to map an entry in the Add/Remove Programs list to an actual program. Each entry in the list, for those who care about such things, comes from the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall registry key. The only mandatory properties for an uninstallable program are the DisplayName and the UninstallPath. Everything else is optional.

Let's suppose Add/Remove Programs is given a program registration like this:

       DisplayName=REG_SZ:"Awesome Program for Windows"
       UninstallPath=REG_SZ:"C:\WINDOWS\uninstall.exe -SomeParameters"

In order to get the "Last Used" and "Frequency" values, Add/Remove Programs needs to know the name of the EXE so it can ask the Start menu "Hey, how often did the user run this program, and when was the last time it happened?"

Notice that there are no clues in the registration above as to the identity of this EXE file.

So Add/Remove Programs starts guessing. It goes through all the programs on your Start menu and compares their names with the display name of the uninstallable item. It looks for Start menu items which share at least two words with the words in the DisplayName.

For example, if there were a Start menu item called "Pretty Decent Windows Program", this would count as a two-word match ("Windows" and "Program").

It then takes the one with the most matches and decides, "Okay, I guess this is it." Suppose for the sake of illustration that the best match is indeed "Pretty Decent Windows Program.lnk", which is a shortcut to "C:\Program Files\LitWare\Decent Program\Decent.exe". Add/Remove Programs would decide that "Awesome Program for Windows" should get the icon for "Pretty Decent Windows Program.lnk", that the frequency of use and most-recently-used information for "C:\Program Files\LitWare\Decent Program\Decent.exe" will be displayed for "Awesome Program for Windows".

But wait, there's more. There's also the program size. Add/Remove Programs looks in your "Program Files" directory for directories whose names share at least two words in common with the DisplayName. The best match is assumed to be the directory that the program files are installed into. The sizes are added together and reported as the size of "Awesome Program for Windows".

A program can add some properties to its registration to avoid a lot of this guessing. It can set an EstimatedSize property to avoid making Add/Remove Programs guess how big the program is. It can also set a DisplayIcon property to specify which icon to show for the program in the list.

But if a program omits all of these hints, the guess that Add/Remove Programs ends up making can often be ridiculously wide of the mark due to coincidental word matches. In my experience, Spanish suffers particularly badly from this algorithm, due to that language's heavy use of prepositions and articles (which result in a lot of false matches).

Yes, this is all lame, but when you are forced to operate with inadequate information, lame is the best you can do.

[July 15 2004: Emphasizing that this is done only if the program fails to provide the information itself. For some reason, a lot of people who link to this page fail to notice that little detail.]

Comments (120)
  1. I guess this would explain why I never get the plain old "Command Prompt" in my most used items, but instead it adds the Visual Studio Command prompt instead.

    How annoying.

  2. Joel Spolsky says:

    What? FORCED to operate with inadequate information?

    <dripping with="sarcasm">

    Who exactly defined the format of that registry key? Apple?

    Just start requiring a few more keys. As soon as you tell people "only" two keys are required that’s all they’re going to supply. Also, nobody’s forcing you to guess. You could just put (Unknown) in those two columns, instead of telilng me that Adobe Acrobat is 266 MB and I rarely use it (unless by rarely you mean "every few minutes")

    This is a great example of a case where by being really liberal in what you accept, you never taught programmers to do the right thing in their installers. I’ll bet the Adobe setup programmers don’t even know that their program shows up wrong in Add/Remove Programs, let alone how to fix it.

  3. Scott says:

    Wow, it only uses the start menu to see if a program was used? That explains why the data is junk — I usually use Quick Launch toolbar or desktop to shortcuts to start programs.

    It’s too bad Windows never had a proper file registration system for installed packages, something like debian’s apt format. So that each program that’s installed has an explicit list of files, and all uninstall can be done at the OS level. You get a proper accounting of disk space usage as a free bonus.

    Speaking of which, I don’t know if this was fixed in XP, but why isn’t there some way to delete items from the Add/Remove Programs dialog? I think you can do it with tweakui, but wouldn’t it be make sense to automatically remove a program’s entry if executing it’s uninstall failed because the file was missing?

  4. Aarrgghh says:


    No sense spoiling the rest of the discussion with an unmatched sarcasm tag.

  5. Eric Wilson says:

    The display name and uninstall executable are probably the only required entries for backwards compatiblity. Remember, the size and how often the application is used were added in the later releases of Windows (I believe Windows 2000 was the first release to support them).

  6. 4nd3r$ says:

    When i change the displayname of tweakUI to "PowerToy: TweakUI" (i like to sort my stuff, eg: Games,Development and so on) it doesnt change…why?

  7. Kannan says:

    Oops, that explains why most times it shows crap in Add/Remove programs, thanks for sharing this Raymond.

  8. Thanks for writing this. I don’t think anyone would ever have guessed this is how it works (or rather doesn’t work). I always wondered why the how frequently used info was always wrong – I never use the start menu. It seems like if there isn’t reliable information you should … not try and pass that information on to the user as a fact.

  9. Andrew Deren says:

    Now I know why it takes forever to open "Add/Remove" dialog.

  10. JohnnyO says:

    I think a much more intelligent solution would have been a question mark icon and fields labeled unknown.

    This sounds like a classic case of over-engineering. Someone was probably tasked with this, and finished the basic functionality in a few days, but had more time to kill, so he added the extra "features"

    PS Is the start menu still the preferred method of accessing programs? Most people I know have desktop links for their common programs and only go to the start menu for something that is needed only rarely. (i.e. Not worth the desktop space)

  11. BrianM says:

    Displaying "Unknown" for fields that can’t be populated from the registry would be a terrible idea. Can you imagine a user’s reaction when the installer claimed it didn’t know how big a program was, where it lived on disk, or what its icon was? That’s not the sort of program a user wants to rummage around on their computer deleting things.

    In this case, a hack that pretends to know what it’s talking about (for display purposes only, remember — none of this hack stuff gets used for the actual uninstallation) is a much better idea for the user’s peace of mind.

  12. While I think it is great that Microsoft has placed a quite an effort to ‘make things proper’, I am going to have to agree with Joel, here. When you try and help out people too much, they will continue to show a complete lack of effort. And look at the mess this creates…

    I have always wondered why the ‘Add/Remove Programs’ dialog takes two hours to appear – even though I thought all it had to do was read and display pre-stored information. But, now I know the answer.

    Great article, btw, Raymond. I love hearing about the internals of such things.

  13. Raymond Chen says:

    "wouldn’t it be make sense to automatically remove a program’s entry if executing it’s uninstall failed because the file was missing?"

    Yup, Add/Remove Programs does this. If the uninstaller is missing, it offers to delete the entry.

    As for making the other fields mandatory: That would have required being clairevoyant, knowing in 1995 when the Uninstall key was originally designed that Add/Remove Programs in Windows 2000 would need more information.

  14. Steve Sheppard says:

    I have to say the size /usage info are brilliant examples of lame features that should have been cut, why are they still there? There must be a reason this wasn’t just simply dropped once we realized (soemone did notice, right?) it doesn’t really work as expected.

  15. Joe White says:

    Obviously nobody knew in 1995 that this info would be required later. But MS keeps coming out with new guidelines and new versions of Windows Installer… why not just say "installation of this new registry key is required as of Windows Installer 2.1, and we won’t even let you build an installer that doesn’t include it"?

  16. Raymond Chen says:

    That sounds like a great sugestion for the Windows Installer team.

  17. Vassili says:

    Ok, so Add/Remove takes forever to open. But may be there is a way to uninstall program from the command prompt and not open Add/Remove dialog at all?

  18. BrianM: what would reduce a user’s confidence more: saying "honestly, I don’t know" or showing an obviously absurd guesstimate (which is bound to happen eventually)?

    Raymond: Why not asking installers to put in the registry the name of a file with the full list of files installed by it? Then you could easily do something like Debian’s "popularity-contest" and get a reliable indication of when the program was last used.

  19. How the Add/Remove programs estimates size

  20. Raymond Chen says:

    Cesar: If you have a file that is used by multiple programs, then you won’t be sure any more. Plus of course it won’t work for Windows Installer packages that are advertised but not installed. (You ran the program yesterday, then you needed some disk space so you returned it to the "install-on-demand" state. If all the system did was check file timestamps, it would think the program had never been run!)

    Vassili: The answer is right in front of you. Read my article again.

  21. Vassili says:

    Raymond: do you suggest to use whatever is in the "UninstallPath"? But I would not know what is there until I open RegEdit and find out. Add/Remove is faster than that, at least now on my machine. BTW, on XP it is "UninstallString".

  22. Raymond Chen says:

    Now I’m confused. Your program opens the Uninstall key and sucks out the UninstallString and then executes it. Who needs to open RegEdit?

  23. Vassili says:

    Raymond (sorry so spent your time…): my program? Of course, I can write program which will find "UninstallString" and execute it, just wondered if something is already done. On the other hand, even if I write such program, I would need to know or guess name of the key under Uninstall (SomeProgram in your example). This brings us to recreating "Add/Remove" without size/last used functionality.

  24. JCAB says:


    The thing I have always been wanting to know is not how big the program is, but where it is that big (i.e. the paths used to get the size).

    After all, if I need to make some space in C:, how do I know to leave alone any program that I have which is installed in D:?

    Of course, now I understand that if the Add/Remove thingy had given those paths to me, I would have realized much sooner how imprecise a job it was doing…

  25. Mariano Kamp says:

    Wow. That is worse than I imagined.

    The use of heuristics seems to be the worst possible approach. But if you’re already heading down this path, why don’t you use at least stop words, like: program windows and some spanish words of zero value?

  26. Raymond Chen says:

    I’m not proud of this heuristic. I’m just explaining how it works, not why it is good. (Because it isn’t.)

  27. Caligari says:

    What I don’t understand is why Add/Remove Programs does not use lazy evaluation to determine the "Last Used" and "Frequency" values. These two values only appear when a user selects a program in the listing. Surely the overwhelming majority of people open the Add/Remove Programs dialog with the intent of removing a particular program. When someone opens the applet to uninstall RealPlayer, why is any effort spent determining the program usage metrics of every single program in the listing?

    If Microsoft plans on keeping the "Last Used" and "Frequency" values, the least they could do is rewrite the backend to make good use of lazy evaluation. Only calculate these values when a user selects a program.

  28. Jack Mathews says:

    Raymond: I was always curious as to what sort of voodoo the thing did under the hood. Is this in any way similar to the tray icon automatic hiding stuff in XP? Remembering captions, icons, and owning processes and just trying to match the icons up?

  29. Jack Mathews says:

    Caligari: You can sort by them. So you need them around.

  30. Zachary Turner says:

    Wouldn’t it make more sense to look for an executable in the same folder as the uninstall file rather than searching the start menu?

  31. Jordan Russell says:

    Raymond: You forgot to mention InstallLocation. If you set that value, ARP won’t have to guess where your program is installed.

  32. Caligari says:

    Jack: Lazy evaluation would also apply when sorting by usage. Calculate usage metrics when needed, and no sooner. When the user sorts the listing–that’s when time intensive operations should run.

  33. Caligari says:

    Zachary: Look at Raymond’s example. The uninstall file is in "C:WINDOWSuninstall.exe." It is unlikely an application’s main executable would be there.

  34. Jack Mathews says:


    Well it’s probably evaluating it by looking at the start menu item shortcut’s usage stats, which is already has open anyway for getting the application icon.

  35. Rob... says:

    The biggest question is why does Add/Remove programs supply this information anyway? As the data’s questionable, it’s not like it’s useable for anything meaningful.

    What would have been far more useful would have been to implement a "type the first letters of the word to jump to it" search facility like every other list widget in Windows has!

  36. Thales says:

    I guess this also explains why I can’t sort the list by the date the program was installed.

  37. nexus says:

    I’m impressed you even posted this. If it were me I would be too embarrassed to ever tell anyone how it actually works.

    If it is obvious to everyone that this approach is convoluted, error-prone, and unnecessary, why the heck wasn’t it fixed. Instead you just needlessly complicated things. Doeasn’t anyone at MS say "hold on, this is idiotic, we need to change how this works"?

  38. Thierry Tremblay says:

    Now I am really pissed. I’ve spent literally days trying to figure out what was going on with my multi-compiler installation (VC6, EVC3, EVC4 and VC7). The Add/Remove list always listed non-sense values for the size occupied.

    Thank you for making me waste my time trying to fix something that wasn’t there.

  39. Joe says:

    It’s not entirely clear that this was all thought out before-hand. Raymond doesn’t go into the history or timeline, but I would imagine it goes something like this:

    Windows 95 – Add/Remove Programs invented and registry key defined

    Sometime between Windows 95 and Windows XP (or earlier) – Someone whines "How do I know if I want to uninstall something? I wish I knew how big or often it is!"

    Windows XP (or earlier) – Extend registry key and build creative hack to get information

    Now – Joel Spolsky says, "MICROSOFT SUCKS!"*

    * Actually, he probably didn’t say that.

  40. Rob is the man! I would also like to see the "type first letter"-thingy in the Add/Remove Programs, I’ve been missing that since Win95!

    Thierry, it seems you haven’t played enough with Add/Remove Programs…it was not that hard to realise that there’s always been something fishy with the size and frequency and thus not something to trust (and now we know what smells).

  41. David Candy says:


    If Add/Remove can find the uninstall program it thinks it’s successful. A/R only removes if the installer can’t be found. If the installers data is deleted /lost then A/R thinks it was sucessful cos the error is in the installer not A/R.

    I still reccommend the tweakui version (98’s?) that edits A/R to people. Maybe A/R should check the exit code as well.

  42. David Candy says:

    Why does having a negitive number for the icon (resource ID?) leave a gigantic amount (20 – 30 pages)of white space under that entry. (Autocad is one)

    And their testing team missed it!!!!!

  43. Florian W. says:

    Why can’t Microsoft use a system that is similar to apple?. I always wonder, when I see an installation of MS-Word just by copying the folder. No Starmenu stuff, Uninstall by deleting the application icon… *cool*

  44. Dmitriy Kostovetskiy says:

    It would be better if "Add Remove Programs" first displayed all programs without icon and size estimate and then did all these guesswork in a background thread. Then it wouldn’t take so long to open "Add/Remove" dialog.

  45. Raymond Chen says:

    "Maybe A/R should check the exit code as well."

    The problem is that the meaning of the exit code is not standardized. Does an exit code of 1 mean "uninstall failed"? Or does it mean "uninstall cancelled"? In the second case, you don’t want to remove the uninstall entry.

  46. Scott says:

    Raymond said:

    "Yup, Add/Remove Programs does this. If the uninstaller is missing, it offers to delete the entry."

    I got back to my desktop and realized that the problem entry was actually calling InstallShield (in windows dir I presume) with a config file that was in the application directory. Manually deleting the app directory just made InstallShield error out with a file not found. Guess Windows can’t be held responsible for that… sorry.

  47. A Regular Viewer says:

    Given the availability of hard-disk space, given the library path search sequence, why should there be the ARP applet at all? Either a directory delete, or for any de-regsitration functions – a script in the applications’ directory, should suffice. Of course this question is more for the developers of the Software than the Windows team.

  48. Jon Potter says:

    Are you kidding? Program Files contains files that your computer needs to keep working properly. It’s highly dangerous to go messing about in there!


  49. A Regular Viewer says:

    Not the whole PF directory! Just the Application’s. Which may or may not be installed in PF.

  50. David Candy says:

    Norton’s has an exit code of 42 or something for sucess that freaks people out who read their task scheduler logs.

    But still there is really only Acme, .msi, inf, Installer Shield, and Wise. That would cover 99% of cases. If one comes across my custom installer (could never make heads or tales of installshield and inf didn’t give one file distribution) it can just do what it does now.

    This does affect all tweakui as well (inf and hta). Just trying to make you feel guilty.

  51. Raymond Chen says:

    Actually, if I recall correctly, the numbers from the application compatibility team was that ACME+.msi+inf+InstallShield+Wise is only 65%, not 99%.

  52. flex-mx says:

    Raymond Chen goes into detail how this feature in Windows works. Interesting… but what’s the bottom line? "It’s all just guesswork."…

  53. Niels W says:

    Raymond, great to know what goes on with that add/remove programms box. Think a lot of people have been wondering about that, one time or another.

  54. Most installer people I have talked to have wasted at least one day trying to get Add/Remove Programs to work correctly with their application (usually trying to work out why the icon selection is so weird or trying to understand the size entry).

    Perhaps the best solution would have been for Microsoft to put items that register themselves under the current key in a legacy section and define a new section that would have a much clearer, well-defined design for new items. It might upset a few people and I guess it might have tricky interactions with old versions of Windows but building more and more on top of dodgy foundations seems like a bad idea.

  55. Derek Park says:

    If you removed the guesswork, and displayed a standard "unknown" message and icon, I bet most software distributors would add the desired registry keys fairly quickly. It looks unprofessional to have missing icons on your uninstaller, especially since it’s not complex to do it the right way, and I bet pretty soon teams would be getting demands that they make their uninstallers "work like Microsoft’s". Assuming, of course, that Microsoft is (or will be) doing things the right way.

    As it is now, I bet most developers don’t know about this, because there’s no incentive to find out. I certainly didn’t know.

  56. mike says:

    alhough it’s all hindsight now, what should have been done is that

    – leave out entirely the the est size and freq use for those apps that don’t have that info

    – use a generic windows icon or whatever for those that don’t have the icon info

    – give a pretty color or uninstall certification logo on each one that does fully comply and display it in a small but attractive 16×16 on each line.

    the second and third in particular would have given the right kick

  57. mike says:

    you don’t show as "unknown", you leave out the info for those.

  58. Raymond Chen says:

    Okay, so now every program shows up as blank for those items. Still not useful.

  59. Derek Park says:

    Incorrect information is not particularly more useful than no information at all.

    I think this is one of those cases where Microsoft’s apparent "make everything ridiculously easy, even if it’s not 100 percent right" policy is a step in the wrong direction.

  60. Raymond Chen says:

    When this feature was added in Windows 2000, if a program that didn’t provide this information showed up with "unknown", then *every* program would have shown up as "unknown". That wouldn’t have been very useful.

  61. Before totally writing off this workaround, we should ask what percent of the time it is correct, and within say 20MB of the correct size. Even with the exact info this isn’t an exact science – what about shared dlls, local settings dirs (which can bloat), user files, web updates…

    The most exact system would be to require the uninstall program to send it’s own size estimate of what it will remove, but maybe it just isn’t that important.

  62. I think the fact that the information is plain unreliable for applications not providing the information is clearly an issue.

    But even more important, it makes valid information from applications that do provide the information also useless, as there is no way to differentiate that valid information from the random information generated!

    My vote definitely go to the white or "unknown" size label and generic .exe icon for applications that do not provide the information explicitely, developpers will quickly get their installers fixed.

  63. Raymond Chen says:

    Okay, so suppose that the next version of Windows does as you suggest and just shows blanks and generic icons for programs that don’t provide this information. And some users will perceive it as a regression.

    Those users upgrade and say, "Hey, Add/Remove Programs used to show all this information and now it doesn’t! You broke it!"

    You could try to explain, "No, really, it’s the uninstaller that is broken. Previous versions of Windows were compensating for badly-written uninstallers but it doesn’t do that any more."

    And those users will say, "Well, put it back. I thought the whole point of Windows was to make our (the users’) lives better. If that means doing extra compensatory work when an uninstaller is badly-written, well, that’s your job. I mean, c’mon YOU ALREADY WROTE IT."

    Now, you could tell those users to go stick their heads in buckets of sand, but if they happen also to be collectively responsible for $100 million dollars of revenue [and sometimes they are], you have a fiduciary responsibility to your shareholders to do what you can to keep them happy.

    (Personally I would be thrilled to rip out this guesswork code.)

  64. Derek Park says:

    I’ve always considered the "it’s tradition" a poor reason for doing anything, and that’s really what that argument comes down to.

    You could remind users how much faster add/remove programs became after the change.

    You could add a "give you nearly made-up numbers?" choice the first time the add/remove dialog is run. Be friendly and call it "XP compatability" mode (with an explaination of what it entails) if you prefer. Stick the option somewhere easily accessible after the first run and stick in article in the help documentation somewhere explaining the change. The few users who both notice and care will then be able to easily find out exactly how and why the behavior changed and then change it back if they prefer.

    You could add some new feature(s) and explain away the change as necessary for the new, nifty feature(s). Unfortunately I can’t think of any new feature right now. Talk to R and D for that one, I guess.

  65. Raymond Chen says:

    Sure, display a confusing dialog box the first time somebody runs Add/Remove Programs. That’ll solve the problem.

  66. David Candy says:

    I’ve been examining my listing. Some are blank. One that was was one of 3/3 tweakui entries except this one (1/3) had appended to the name Common Database (I clicked Remove to get some info on what it was and it did remove so I can’t tell you the details of that one – but it’s still installed both 2.1 and 1.33 – computers that obey – how dare it). It was probably Ver 2 as it isn’t in the registry. The two remaining Tweakui have Display and Uninstal and 2.1 has shortcut path as well yet they are blank details in A/R.

    The only other entry I have with Common Database appened is IE4ShWiz (Ramesh made me install it)which is installed under a GUID string with a .sdb appended to the GUID string



    Also what is the definition of Rarely/frequently.

    I believe that the Start Panel counts all executions of an exe while Classic Start records only those executed from Start. Does this affect A/R.

  67. Derek Park says:

    Confusing? How would that be any more confusing than telling me (or anyone else) that the J2SDK occupies only 1.89 megs, the JRE uses 1.66 megs, and that GTA III uses a grand total of 3.30 megs? How is it more confusing than telling me that I rarely use Firefox, and that I haven’t used it since early March?

    Apparently it does throw in a standard generic icon sometimes, though, because GTA III (among others) shows up with the standard installer-style icon, rather than the icon in the exe.

  68. Michael Antonelli says:

    this is completely ridiculous, it guesses?

    what if you have two seperate programs with VERY similar names and it confuses the links for the two??

  69. Raymond Chen says:

    Then you’d better hope that the authors of the two programs set the EstimatedSize and DefaultIcon properties.

  70. Raymond, why not add a (guessed) next to the guessed values? Then users will know the values are bogus (and most important, which ones aren’t), but you still keep the oh-so-important broken guessing algorithm.

    (And you could change the guessed icons to a generic one.)

  71. Scott says:

    In my list, the only entries without a size are the Windows 2000 hotfixes. I find that a little amusing.

  72. Cooney says:


    > And those users will say, "Well, put it back. I thought the whole point of Windows was to make our (the users’) lives better. If that means doing extra compensatory work when an uninstaller is badly-written, well, that’s your job. I mean, c’mon YOU ALREADY WROTE IT."

    To which you can respond "We wrote it, it didn’t behave well enough to keep it, so it’s gone. Bad information is worse than no information, so we have decided to tell you what is actually going on". outside of a real OS-managed file registry, the only way for this to work is to rely on what the app reports. If it doesn’t report, we don’t know.

  73. David Candy says:

    You obviously have people at MS that say "That’s a stupid idea, go away". I remember a thread about a file copy dialog where you were saying [IF] yoo took it to a feature committee [a file copy dialog with all of Xcopy’s features] they’d say go away. And that you weren’t going to (after the xcopy death threat I suppose you went off copying files). So how did this get past such a committee. And why did someone champion it. Was it because oof these "corporations"? If not what was the percieved need for it. What did the committee think about the algorithm.

  74. Centaur says:

    The Windows 95 Add/Remove dialog was more functional. At least it supported basic list navigation key such as PgUp/PgDn, Home/End and first letter search. And if we wanted an estimate of which program was the most space hog, we could always inspect %ProgramFiles% with a third-party file manager (or Explorer, but it doesn’t have a key to calculate and show all selected directories’ individual sizes).

    Now, though, everything is not lost. Someone just needs to get tired enough and write an “Add/Remove Classic” control panel applet :)

  75. mike says:

    Raymond your 7/10/04 10:48PM comment is simply paranoid. Bbelieve me, I write software that quite a few folks (not MS level of course) use.

    You are in fact defending (even if you say you aren’t) a silly design decision, one that gives useful info MAYBE 50-60% of the time, by saying there was no better way to do it.

    It’s water under the bridge and probably NOT worth changing at this point. So all I’m saying is – given a TARDIS – the info should have not been provided except for those apps with the keys.

    Yes they woulda be blank. so what? as pointed out by others, so are MS hot fixes, and no one freaks out.

    All you do is add that (along with other stuff) to a "Enhanced Uninstaller Certification" and provide a logo. Companies will eagerly add it to their products so they can have another bulletpoint (note my cynicism here).

  76. Raymond Chen says:

    You certainly won’t believe me, but I know for a fact that there exist corporations that *want* this information, as completely bogus as it is. (How do I know? Because they ask me how they can get it! That’s why I wrote this entry in the first place – because I get asked it a lot.)

    (And yes, you get blanks if the above lame algorithm fails to find a single match.)

  77. rory says:

    This is unbelievably bad development. Didn’t anyone at the time think: "what’s the point of this algorithm, it’s likely to lead to inaccurate info at least as often as it provides useful info?"

    Given that the algorithm produces dodgy info at best then there are a few ways to improve the performance. Lazy evaluation mentioned above is the preferred method. However, does application size change that much over time? Could this have been calculated once and the value stored in the Registry for subsequent reads? I could go on but you get the idea.

    Also, when are MS going to lose the abomination that is the Registry ?

    ps – Raymond, I really enjoy your articles and insights !

  78. Raymond Chen says:

    The information does get cached for future use.

    HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion App Management ARPCache

    Before you can ditch the registry you have to (1) come up with a replacement, (2) come up with a backwards compatibility story for all the code that uses the registry, and (3) come up with a plan for how the replacement can avoid the problems that the registry currently suffers from.

  79. Bert's blog says:

    Zoals eerder geschreven ben ik de laatste tijd regelmatig bezig met installatieprogramma’s (voor mijn werk).

    Raymond Chen vertelt hier hoe windows gegevens voor het Add/Rem

  80. Apps showing wrong icon and likely wrong size information on my PC:

    Advanced Networking Pack for Windows XP (Microsoft)

    Alt-Tab Task Switcher Powertoy for Windows XP (Microsoft)

    CmdHere Powertoy For Windows XP (Microsoft)

    Developer Resources for Windows Mobile 2003 Second Edition (Microsoft)

    Image Resizer Powertoy for Windows XP (Microsoft)

    Magnifier Powertoy for Windows XP (Microsoft)

    Microsoft Data Access Components KB870669 (Microsoft)

    Microsoft eMbedded Visual Tools (Microsoft)

    Microsoft Money for the Pocket PC (Microsoft)

    Microsoft Pocket PC 2003 SDK (Microsoft)

    Microsoft Reader Text-to-Speech pour le français (Microsoft)

    Microsoft Windows CE Platform Manager 4.0 (Microsoft)

    Microsoft Platform SDK for Handheld PC 2000 (Microsoft)

    MUI Package for Windows Journal Viewer (Microsoft)

    Slideshow Generator Powertoy for Windows XP (Microsoft)

    Socket SDIO WLAN for Windows Mobile (Socket Com.)

    Standard SDK for Windows CE .NET (Microsoft)

    Standard SDK for Windows CE .NET 4.2 (Microsoft)

    Virtual Desktop Manager Powertoy for Windows XP (Microsoft)

    Windows Mobile 2003 Second Edition Emulator Images for Smartphone – WWE (Microsoft)

    _ALL_ Windows XP Hotfix (Microsoft x23)

    Err, except from Socket Com. (gonna notify them this week about this problem), it seems the company that has the most installers to fix is ..(drumrolls).. Microsoft!

    I still say wrong information is worse than no information, today people cannot trust any of these values, and they know it…

    Are you sure there will be more people asking why you removed that guesswork than there is today asking why some sharewares which took around 10MB when downloaded are reported as taking up almost a whole gigabyte in Add/Remove applet?!

  81. mike says:

    "You certainly won’t believe me, but I know for a fact that there exist corporations that *want* this information, as completely bogus as it is. (How do I know? Because they ask me how they can get it! That’s why I wrote this entry in the first place – because I get asked it a lot.) "

    I believe you, but I think they asked because they thought the info they’d get was ACCURATE.

  82. David Candy says:

    The registry would be easier to examine if it allowed two window, one on clsid and one whereever. Say finding what BHOs are installed, it’s very difficult for a human with regedit to assertain that (I can’t memorise a GUID and recognise it even 5 secs later let alone 10 of them).

    And these GUIDs are like rabbits. They keep breeding. They are now in A/R Programs as well, just to make it harder for humans to read and navigate.

  83. Mat Hall says:

    Raymond, defend it all you want, but the A/R dialog is STUPID, BROKEN, and WRONG. Even the most computer-ignorant user can see that something’s not quite right when programs they use all the time show up as "used rarely", but not knowing that actually most of the information in there is completely fictional they’re going to assume something far worse, and possibly start panicking about viruses or whatever.

    In the absence of making it work properly, all that needs to be added are options to view in one of three modes:

    – As it is now.

    – Without any guesses — if you don’t KNOW, leave it blank.

    – With guesses marked as such.

    That way all these people you claim are desperate to be given false and misleading information can have it, and the rest of us normal people can do away with it.

    (Oh, and of course, jump-to-letter, page up/page down, etc. to make navigating the list easier.)

  84. DomF says:

    I find the info pretty useful most of the time. I already knew it was half assed guesses most of the time (from looking at the results!) but as a first stab at clearing some space it is better than nothing and has speeded up my occasional uninstall blitz no end.

    I agree with changing Windows Installer though :) Ask InstallShield nicely too and all the other installers will join up eventually.

  85. Scott Robins says:

    Instead of leaving it blank or "unknown", make the message be "The application has failed to provide the information".

    That way, MS doesn’t get blamed.

  86. 4nd3r$ says:

    What is this key: HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion App Management Icon Hints and can it be used to get the right icon?

  87. Harry says:

    I think adding (estimated) next to the size & date (as appropriate) would be ok. It’s not confusing, doesn’t require that the user do any extra work, and at least gives them a heads up that the value may be incorrect.

    I’ve always thought that Windows should have an ‘expert mode’, where extra dialogs and things that could potentially confuse novices are included, for the benefit of those that can understand them – I suppose that’s completely impractical though.

  88. Raymond Chen says:

    Saying "estimated" suggests that the items that aren’t marked "estimated" aren’t estimates, but actually they are estimated too. The property name in the registry is EstimatedSize, and some programs don’t update it when you reconfigure them.

  89. And you didn’t think about making EstimatedSize mandatory in Windows Installer 3.0 and required for Windows XP Logo certification (for previous MSI versions) ?

    Better no feature than a feature that looks like a bug, this Add/Remove feature is one of the components that makes Windows looks inaccurate overall to some users (or former users).

  90. Michael K. Antonelli says:

    I have several programs in one bundle, and it appears that only the first one has the estimated size and all the others count as zero.

    its wierd…

  91. Mr. Cynic says:

    Philippe: MSI always writes the EstimatedSize value automatically and has done so for quite a while now. It also adjusts the EstimatedSize value as you install and remove various subcomponents of the application.

    For more info on how MSI apps can set various ARP properties, see:

  92. MSI always writes the EstimatedSize value automatically (…)

    That’s good news, so I guess there is a very simple solution to get more valid results in Add/Remove Programs:

    Work with the 5 top software companies building installers (InstallShield and all) to get their software to take care of that value automatically also, so ISVs that do not even know about the guesswork still get their installers fixed!

  93. Kiliman says:

    "That way all these people you claim are desperate to be given false and misleading information can have it, and the rest of us normal people can do away with it."

    I guess those are all the people going to see Michael Moore’s film.

  94. 4nd3r$ says:

    The answer to my own question: HKEY_CLASSES_ROOTInstallerProducts

    can you give us some info about this key Raymond? …AdvertiseFlags sounds dodgy

  95. Raymond Chen says:

    The Installer key is MSI. You’ll have to ask them what their keys mean. "Advertisement" is an MSI term.

  96. God, this is bad! Raymond, thank you for explaining the behavior. Now that its out in the open though, it seems everyone is agreeing its worse that not showing this info in the first place. Are there any plans to address this in Longhorn timeframe? It would be great if you could blog a follow-up!

  97. Raymond Chen says:

    My focus is on history not the future.

  98. John Bates says:

    A feature that would avoid a lot of the time wasted waiting for A/R to open would be an ‘expert’ key in the registry that just skips all this nonsense and sets the estimated size to zero, etc. if not supplied. I know when I used something – when I want to remove it it no longer matters…

  99. Norman Diamond says:

    Somewhere I saw someone’s opinion that the reason why A/R’s display of size and other garbage should be illegal is because it lies.

    Let’s see if I can find the statement of that opinion… Yup:

    It should be illegal because it lies.

  100. nikos says:

    what i don’t understand is how the "frequency" field is calculated. Is it stored somewhere within the shortcut? I don’t see any book-keeping file in the start menu (at least for win2000)

  101. Tna says:

    Like I believe someone stated above, the "frequency" does seem kind of useless, one doesn’t really look in add/remove programs…I’m sure it looked good as "wow cool" thing though, even though I don’t think many people even notice it. And if it does increase startup time as much as others have said it does, why is it still in?

  102. AndyC says:

    I think the way to solve this is a threefold solution:

    1. Make it mandatory for MSI installations to provide this information and as much meta-data as can conceiveably be useful in future.

    2. Split the Add/Remove dialog so that non-MSI installers get added in a separate "This application is rubbish and Windows recommends you get rid of it and replace it with something decent" or "legacy" section. Make dissuading developers from using non-MSI based installations a #1 priority.

    3. Use lazy evaluation/background threading of the heuristics for legacy apps where possible to make the Add/Remove dialog open a lot faster.

  103. A program has registered a bad uninstall icon.

  104. I stumbled across an interesting item posted a while back by Raymond Chen about the Add/Remove Programs…

  105. It thought it was trying to help.

  106. Channel 9 says:

    Raymond Chen posted an explaination of this recently.

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