Removing Windows Installer Data

If you thought manually removing legacy applications was difficult, try removing a Windows Installer-based application manually. More than once I've broken Windows Installer-based applications so badly that I couldn't remove them, repair them, or reinstall them. In these cases, I had to manually remove the application's Windows Installer data from the registry or reinstall Windows XP. Tools are available that automate this process, and you learn about them in this chapter. Removing Windows Installer data without these tools is akin to replacing transistors on your computer's mainboard—it's not really possible.

Before I introduce the tools, I'm going to point you to the location in the registry where Windows Installer stores data about the applications it installs. Don't modify these settings using Registry Editor (Regedit) because doing so will likely inflict pain on you. Straightening out the relationships between all the different bits of data that Windows Installer stores in the registry is difficult. This is just good information to have available:

  • HKCU\Software\Microsoft\Installer. This branch contains per-user Windows Installer data for applications that you install per user.

  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer. This branch contains Windows Installer data for per-computer applications and managed applications.

  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall. This branch contains removal information for Windows Installer-based programs.

  • HKCR\Installer. This branch contains information similar to the Installer key under HKLM.

The tools you learn about in the next two sections come with Windows XP Support Tools. You install the tools from \Support\Tools on your Windows XP CD.

Msizap.exe

Msizap is a tool that removes most of the data that Windows Installer maintains for an application. It doesn't remove the application's files or settings from the hard disk however; you have to clean those up yourself. You can focus this utility on a single application or you can make sweeping changes to the Windows Installer data. I've had good luck using Msizap to remove a single application's Windows Installer data from the registry, but I don't trust it to make huge changes, such as allowing it to remove all the Windows Installer folders and registry keys.

The following examples show the different forms of the Msizap program's command line. The first two forms are the most useful. In the first case, you specify the product code, which is the product's unique GUID. You're not likely to know the product code off the top of your head, so you're going to want to use the second form. In the second form, you specify the path and name of the package file. Then Msizap will look up the product code for you. An example is in order. Assuming that you've installed Microsoft Office XP and can't remove it using Add Or Remove Programs, you'd type msizap T! path\proplus.msi in the Run dialog box. Path is the path containing the package file Proplus.msi. After Msizap finishes removing the application's Windows Installer data from the registry, you'll still have plenty of cleaning to do. You'll want to get rid of the application's files and other settings that it might have stored in the registry. For example, you'll still see the application's shortcut on the Start menu, but when you click it, you'll see an error message telling you that the application isn't installed. Chapter 3, "Backing Up the Registry," describes how to manually remove a program after you've got it to this step.

 msizap T[A!] productcode msizap T[A!] packagefile msizap *[A!] ALLPRODUCTS msizap PSA?! 

*

Remove all Windows Installer folders and registry keys, adjusting shared DLL counts and stopping the service

T

Remove all Windows Installer information for a product

P

Remove the in-progress key

S

Remove rollback information

A

Give administrators full control to targeted folders and keys instead of removing them

W

Apply changes for all users instead of just the current user

G

Remove cached Windows Installer files that are orphaned

!

Automatically respond Yes to all prompts

?

Display help

Tip 

I'm not comfortable with manually removing a program's files and registry settings after using Msizap. Most large applications store settings in the registry beyond the typical HKU\Software\Vendor\Product\Version keys. For example, they register components in HKCR, and you might not get rid of them all. My solution seems odd, but it works well. Zapping a program's Windows Installer data from the registry should enable me to reinstall it. So I reinstall the application and then use Add Or Remove Programs to remove it. Windows Installer is likely to do a much cleaner job of removing the application than I am.

Msicuu.exe

Windows Installer Clean Up (Msicuu.exe in the Windows XP Support Tools) puts a graphical user interface on Msizap.exe. If you're sitting at the computer, use this tool instead of using Msizap at the command prompt. It's less error-prone:

  1. In the Run dialog box, type Msicuu, and click OK.

  2. In the Windows Installer Clean Up dialog box, shown in Figure 11-1, click the application for which you want to remove Windows Installer data from the registry, and then click Remove.

    click to expand
    Figure 11-1: Windows Installer Clean Up is a friendly interface for Msizap.

  3. Confirm that you want to remove the application's Windows Installer data from the registry by clicking OK.



Microsoft Windows XP Registry Guide
Microsoft Windows XP Registry Guide (Bpg-Other)
ISBN: 0735617880
EAN: 2147483647
Year: 2005
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net