Did you know that when you install a patch/update/service pack for any product on your XP machine using Windows Installer, the patch source is cached in whole, consuming precious disk space? If your setup is canceled or exits due to an error, these caches can sometimes be left behind – forever! The next time you proceed with the same installation, the old cache is never used but a new copy is made at that time. This is what is called an Orphaned Patch. (I guess this is so common that they coined a neat looking term for it as well.)
I believed my system did not have any such orphans since I usually am extremely careful with software setups and updates (after my fiasco with the VS 2005 beta setup). But when again I was limited from installing the Microsoft’s released .NET Framework 3.5 due to VS 2005 SP1 not being installed, I was forced to do this update.
The VS 2005 SP1 has scores of known issues and there are pretty good workarounds for them. You can get more info on them here and here if you have planned to/just installed the SP and are facing issues.
But the most mind boggling part of the SP1 setup was the time it takes and the amount of disk space it requires. Documentation states it may take hours but common usage states it takes approx. 1 hour at 100% CPU utilization. But far more intriguing is the fact that the setup requires a minimum of 6.2GB space on your windows installation drive!!
This was totally unacceptable with me(and as I found out, with many others as well). So I found this great article by Heath Stewart who has put up many a post relating to these issues. All he suggests we do is disable the patch cache feature of Windows Installer(temporarily) and then proceed to do a silent install. My SP1 install was done in minutes and hardly consumed 500MB. Phew!!
But that’s not all. I discovered a means to remove those old orphaned cached patches from this article. How to go about doing that – Well, we’re back to the Windows Installer Cleanup Utility (yes, you read that right, its a tool that cleans up your goofed up windows installer installations). This very same tool was the godsend for me while solving my VS2005 Beta installation issues. What this tool does, you will read on the KB article. But the tool works by invoking a small command line utility called msizap (made available originally in the windows SDK). For our specific purpose to delete orphaned patch caches, simple invoke this tool with the parameter ‘G’ like this:
C:\Program Files\Windows Installer Clean Up\MsiZap.exe G
People who read the original article have reported they retrieved 23GB of space from their %WINDIR%. This gave me 2.3GB back on my 20GB partition. Great huh!