Msizap is a command-line tool that can delete the configuration data that Windows Installer maintains for products that it installs, including the directories, files, registry subkeys, and registry entries in which Windows Installer stores configuration data.

Running msizap.exe with the G parameter removes orphaned cached Windows Installer data files for all users. Running this command on an old Windows XP machine allowed me to reduce the size of the C:\Windows\Installer directory from 3.6GB down to 875MB.

Table of Contents

    This computer had so many orphaned files due to the constant installation and uninstallation of software such as Java, Flash, Acrobat Reader, and other utility software over the years. Yes, orphaned files persist on your hard drive despite following proper uninstall procedures.

    Howto: Use msizap to Remove Orphaned Cached Windows Installer Data Files to Increase Free Disk Space image 1

    To run msizap, login to the machine as an administrative user and launch a command window. Navigate to the directory that contains msizap.exe, then type the following command:

    msizap !G

    The G option removes the orphaned cache files, the exclamation point forces a ‘yes’ response to any prompt.

    While removing orphaned files should not have any negative impact on your Windows installation, be aware that msizap is a powerful tool that can cause problems if used incorrectly.

    Msizap can be downloaded as a part of the Microsoft Windows Server 2003 Support Tools or the Windows Installer CleanUp Utility. I was unable to find the Windows Installer CleanUp Utility by searching Microsoft’s download site, so note that as of today the file’s name is msicuu2.exe, if the above link goes dead in the future.

    If you don’t want to install the Windows Installer CleanUp Utility, use a program such as 7-zip to extract the individual files. Once you extract the files, you’ll notice msizap.exe does not exist, but you will find MsiZapA.exe and MsiZapU.exe.

    There are two versions of MSIZAP.EXE: MsiZapA.exe (for use in Windows 95, Windows 98 and Windows ME), and MsiZapU.exe (for use in Windows NT, Windows 2000, Windows XP, and Windows Server 2003). The appropriate executable should be renamed MsiZap.exe.

    Current msizap.exe options are as follows:

     msizap T[WA!] {product code}
     msizap T[WA!] {msi package}
     msizap *[WA!] ALLPRODUCTS
     msizap PWSA?!

    * = remove all Windows Installer folders and regkeys; adjust shared DLL counts; stop Windows Installer service

    T = remove all info for given product code
    P = remove In-Progress key
    S = remove Rollback Information
    A = for any specified removal, just change ACLs to Admin Full Control
    W = for all users (by default, only for the current user)
    M = remove a managed patch registration info
    G = remove orphaned cached Windows Installer data files (for all users)
    ? = verbose help
    ! = force ‘yes’ response to any prompt

    For more information on the Windows Installer Cleanup Utility and msizap.exe see KB290301.

    Leave a Reply

    Your email address will not be published. Required fields are marked *