Maintaining the Registry

The Registry is a database, and like any other database it works best when it is optimized. Optimize the Registry by reducing the amount of clutter and information it contains. This means uninstalling unnecessary system components, services, and applications. One way to uninstall components, services, and applications is to use the Add or Remove Programs utility in Control Panel. This utility allows you to remove Windows components and their related services safely as well as applications installed using the Windows Installer.

Most applications include uninstall utilities that attempt to remove the application, its data, and its Registry settings safely and effectively as well. Sometimes, however, applications either do not include an uninstall utility or for one reason or another do not fully remove their Registry settings, and this is where Registry maintenance utilities come in handy.

In the Windows Support Tools, you'll find two useful utilities for helping you maintain the Registry:

  • Windows Installer CleanUp utility (Msicuu.exe)

  • Windows Installer Zapper (Msizap.exe)

Both tools are designed to work with programs installed using the Windows Installer and must be run using an account with Administrator permissions. In addition to being able to clear out Registry settings for programs you've installed then uninstalled, you can also use these utilities to recover the Registry to the state it was in prior to a failed or inadvertently terminated application installation. This works as long as the application used the Windows Installer.

Using the Windows Installer CleanUp Utility

Windows Installer CleanUp Utility removes Registry settings for applications that were installed using the Windows Installer. It is most useful for cleaning up Registry remnants of applications that were partially uninstalled or whose uninstall failed. It is also useful for cleaning up applications that can't be uninstalled or reinstalled because of partial or damaged settings in the Registry. It isn't, however, intended to be used as an uninstaller because it won't clean up the applications files or shortcuts and will make it necessary to reinstall the application to use it again.

Note

Keep in mind that the profile of the current user is part of the Registry. Because of this, Windows Installer CleanUp Utility will remove user-specific installation data from this profile. It won't, however, remove this information from other profiles.

If you've already installed the Support Tools, you can run this utility by typing msicuu at the command line. When the Windows Installer Clean Up Utility dialog box is displayed, as shown in the screen on the following page, select the program or programs to clean up, and then click Remove. The Windows Installer CleanUp Utility keeps a log file to record the applications that users delete in this manner. The log is stored in the %SystemDrive%Documents and SettingsUserNameLocal SettingsTemp directory and is named Msicuu.log.

Note

The Windows Installer CleanUp Utility is a GUI for the Windows Installer Zapper discussed in the next section. When you use this utility, it runs the Windows Installer CleanUp Utility with the /T parameter to delete an application's Registry entries. It has an added benefit because it creates a log file, which is not used with Windows Installer Zapper.

image with no caption

Caution

Windows Installer CleanUp Utility is meant to be used as a last resort only. Don't use this program if you can uninstall programs by other means.

Using the Windows Installer Zapper

The Windows Installer Zapper (Msizap.exe) is a command-line utility for removing Registry settings for applications that were installed using the Windows Installer. Like the Windows Installer CleanUp Utility, it can be used to clean up Registry settings for applications that were partially uninstalled or for which the uninstall failed, as well as applications that can't be uninstalled or reinstalled because of partial or damaged settings in the Registry. Additionally, it can be used to remove Registry settings related to failed installations or failed rollbacks of installations. It can also be used to correct failures related to multiple instances of a setup program running simultaneously and in cases when a setup program won't run.

The complete syntax for the Windows Installer Zapper is as follows:

msizap [*] [!] [A] [P] [S] [W] [T] [G] [AppToZap]

where

  • AppToZap Specifies an application's product code or the file path to the application Windows Installer (.msi) program

  • * Deletes all Windows Installer configuration information on the computer, including information stored in the Registry and on disk. Must be used with the ALLPRODUCTS flag

  • ! Turns off warning prompts asking you to confirm your actions

  • A Gives administrators Full Control permissions on the applicable Windows Installer data so that it can be deleted even if the administrator doesn't have specific access to the data

  • P Deletes Registry information related to active installations

  • S Deletes Registry information saved for rollback to the previous state

  • T Used when you are specifying a specific application to clean up

  • W Examines all user profiles for data that should be deleted

  • G Removes orphaned Windows Installer files that have been cached for all users

Caution

Windows Installer Zapper is meant as a last resort only. Don't use this program if you can uninstall programs by other means.

Removing Registry Settings for Active Installations That Have Failed

Application installations can fail during installation or after installation. When applications are being installed, an InProgress key is created in the Registry under the HKLMSOFTWAREMicrosoftWindowsCurrentVersionInstaller subkey. In cases when installation fails, the system might not be able to edit or remove this key, which could cause the application's setup program to fail the next time you try to run it. Running Windows Installer Zapper with the P parameter clears out the InProgress key, which should allow you to run the application's setup program.

After installation, applications rely on their Registry settings to configure themselves properly. If these settings become damaged or the installation becomes damaged, the application won't run. Some programs have a repair utility that can be accessed simply by rerunning the installation. During the repair process, the Windows Installer might attempt to write changes to the Registry to repair the installation or roll it back to get back to the original state. If this process fails for any reason, the Registry can contain unwanted settings for the application. Running Windows Installer Zapper with the S parameter clears out the rollback data for the active installation. Rollback data is stored in the HKLMSOFTWAREMicrosoftWindows CurrentVersionInstallerRollback key.

Any running installation also has rollback data, so you typically use the P and S parameters together. This means you would type msizap ps at the command line.

Removing Partial or Damaged Settings for Individual Applications

When an application can't be successfully uninstalled you can attempt to clean up its settings from the Registry using the Windows Installer Zapper. To do this, you need to know the product code for the application or the full path to the Windows Installer file used to install the application. The installer file ends with the .msi extension and usually is found in one of the application's installation directories.

You then type msizap t followed by the product code or .msi file path. For example, if the installer file path is C:AppsKDCKDC.msi, you would type msizap t c:appskdckdc.msi at the command line to clear out the application's settings. Because the current user's profile is a part of the Registry, user-specific settings for the application will be removed from this profile. If you want to clear out these settings for all user profiles on the system, add the W parameter, such as msizap wt c:appskdckdc.msi.

Note

If you use Run As, you can delete installer data and settings for a specific user rather than the current user or all users.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset