Thursday, June 24, 2010

Clean Up C:\Windows\Installer

If you have a Windows computer that's been around for awhile, you may have noticed that your free disk space has gotten kind of low, lower than you would expect. WinDirStat is a great little utility to figure out where that space is going. If you use that program, you might discover that C:\Windows\Installer is really big. Sometimes that directory is not as clean as it should be because of various failed program installations or unclean uninstalls.

Use the Windows Installer Cleanup Utility to safely get rid of the unneeded cruft. Download the installer here. Once installed, open up a command prompt and type:
cd "\Program Files\Windows Installer Clean Up\"
msizap G!

In one case that I saw, 7 GB was reduced down to about 1.5 GB.

I do not recommend using the other utility included with the installer unless told to do so elsewhere. This is the utility that you will see a new entry for in the Programs menu and is not a command line program. Its purpose is not related to the one this post is written about.

If you see an error message like:

MsiZapInfo: Performing operations for user S-1-5-21-.....
Removing orphaned cached files.
Error opening 9040110900063D11......\InstallProperties subkey of Products key for S-1-5-18 user. Error: 2.
FAILED to clear all data.

don't worry about it. The program has finished cleaning up all it can. If you're bothered by it and know your way around the Windows Registry, you'll find the GUID listed somewhere under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData. If you're sure it refers to something you've uninstalled already, go ahead and delete the key, run 'msizap G!' again and you shouldn't see the error message anymore.

(Note: I am aware this information is already available online elsewhere in some for or other, but I found it to be somewhat scattered and confusing.)

5 comments:

  1. Great tip :) My Windows\Installer folder was 50,6 GB, after trying this solution it is 1,63 GB !!!

    ReplyDelete
  2. It's available here now as well.

    Deleting of Windows Installer Cache (C:\Windows\Installer\) Files
    http://support.microsoft.com/kb/2667628

    ReplyDelete
  3. Thank you! You *did* explain it better.

    Tom

    ReplyDelete
  4. Worked like a charm. Reduced 79GB down to 4.9GB. Thank you William Yang!

    Mark Bush
    Owner
    RAD Computers
    www.1radpc.com

    ReplyDelete
  5. Well, in my case, doesn't look like it did anything. It immediately returned four lines of Error : 2 and Installer folder is still taking up 7.6 GB as before. :(

    ReplyDelete