A corporate customer wanted to know where the Installed Updates control panel gets the Installed On information from, because they found that the values were always set to the current date regardless of when the update was actually installed.
The algorithm goes roughly like this:
First, ask MSI what date the update was installed by calling
MsiGetPatchInfoEx and asking for the
If that doesn't work, then go to the registry key under
Software\ and look for a value called (surprise)
InstallDate. (Note that 32-bit updates on 64-bit machines will be redirected into a
If that still doesn't work, then it's time to guess: Windows XP uses the last-modified date of the directory that contains the uninstaller. Windows Vista and higher use the last-modified date of the
Software\ registry key. (Again, possibly with a
Wow6432Node stuck in there.)
Bonus chatter: Interestingly, the customer didn't phrase the problem like that. The customer said, "The first time a user logs on each day, the install date changes to the current date. Subsequent logons the same day do not change the date. But the first logon the next day changes the date again. What's so special about the first logon of each day?" What's so special about the first logon of each day is that it's a new day! I suspect that the the date is updated on every logon. It's just that they don't notice the change because the date is the same.