Reference: The Service Pack Shuffle
There's one other case for needing to detect whether or not a particular update has been installed.
I had a case where on Windows XP SP2, installing a specific component of my application would result in a bluescreen that could not be easily cleared from safe mode (Windows Installer doesn't run in safe mode on XP). There was a particular update required to be able to install, so I checked for it by checking the version number of one of the files in the update (I believe it was kernel32.dll but that's not important). I got lucky and it wasn't one of those dual-mode updates (released between SP2 and SP3) so a simple greater-than version check did the job. Had it been such an update I don't know what I would have done. Calling Windows Update Agent would have been out of the question as I had to function without internet access (meaning WUA could theoretically not know of the update's existance) and the problem was so bad that I couldn't allow the install to continue.