Attempting to tame C:\Windows\Installer

Nobody seems to know why the C:\Windows\Installer directory sometimes spirals out of control.

All I can add is that I’ve seen this kind of behavior. At a previous job, I administered a couple hundred servers. I had web servers, database servers, domain controllers, utility servers, installation servers, and the old web servers which basically served as a playground for the people who had more clout than me.

Everything but the playground servers theoretically started out identical to each other except for the IP address. They were built following the same instructions.

But invariably, one or two servers in each team would suffer from perpetual low disk space. To keep things running, I had a few Red Green-like solutions.
On your own PC, you have an option I didn’t have. You can run CCleaner whenever you want. It won’t get everything, but it’ll get rid of some junk with minimal effort.

When I needed to clear some space immediately, my favorite trick was the following, after opening a command prompt:

cd \windows
compact /c /s *.txt *.log

This quickly turns on NTFS compression on all log files in the Windows directory. Every patch you install generates a log file. I was loathe to just outright delete them, because sometimes an auditor would show up and claim I was missing some patch from six months ago, or worse yet, from 2005, and the log file was the easiest way to make them go away.

But when C:\Windows\Installer decides to start chewing up more disk space than the rest of C:\Windows and C:\Program Files combined, what do you do?

Microsoft released a problematic tool called the Windows Installer Cleanup Utility, or msizap.exe. They’ve since withdrawn it, so getting your hands on it isn’t always easy. The easiest-to-find source is the Windows Support Tools. Since it was last supported in Windows 2003, I would be hesitant to run it on Vista, 2008, or 7.

I understand the biggest problem with it was when you used switches other than the g switch, and if you had Office 2007 installed. I don’t have Office 2007 and never will, so that’s not a problem for me.

Once you manage to hunt down msizap.exe and install it, do the following from a command prompt:

cd “\program files\windows installer clean up”
msizap.exe g!

This will empty out all the orphaned content from the directory.

Preventing the problem in the first place would be better, of course. There’s no really good way to do that, other than reducing the amount of work you ask the Windows Installer to do. You can reduce some of it by installing slipstreamed copies of Windows, Office, and everything else you can when you build the system, rather than building the system and then patching.

But there’s not much else you can do. Current versions of Windows have the problem, and Windows has the problem going back at least to Windows XP.

It’s unfortunate that Microsoft doesn’t acknowledge the problem, and they’ve also withdrawn the only tool for fixing it. I guess they’re just counting on 3 TB hard drives to hide the problem.

Or you could stick with XP, I suppose. Or, if you’ve already moved to Vista or 7, image the system, run the very latest version of msiexec.exe you can find and take your chances, and if something breaks badly, restore the image.

Or, if the problem gets too far out of hand, slipstream and rebuild. For those who rebuild every 6-24 months anyway, that may actually be viable, as slipstreaming is just one additional step.

Similar Posts:

Be Sociable, Share!
Leave a comment

2 Comments