Windows – How to force uninstall a software that is installed by MSI package

silverlightwindows-installer

Now my computer's Silverlight 5.1.10411.0 (x64) cannot be uninstalled because the MSI package is missing, how can I force it to uninstall? The reason that I want to do this is that I cannot redownload the installed of Silverlight 5.1.10411.0 (x64), there is a x86 one, but not x64 one – shame on you, Microsoft, or me for that I cannot find it using Google. Or if someone can point me to the right download package is also acceptable.

Best Answer

Here is a little article I have been working on, and although it does not address your question directly, it might be useful. Just pay attention to the registry keys I mention and you can generally delete them, as well as the C:\Program Files\Application folder to trick the installers into think

Everything You Wanted to Know about Add / Remove Programs in Windows

Have you ever wondered how Windows presents and uses the Add/Remove programs? Or perhaps you have the need to enumerate these values yourself? Here is some useful information on how it works, how to use it and some neat tricks you might enjoy.

enter image description here Everything you see in add and remove programs (XP, Vista, 7 confirmed) is written to the registry at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ as a subkey. enter image description here

For example, I have the subkey CutePDF Writer Installation with the keys and values:

Now, of interest here is the UninstallString value. When you click “uninstall” in Add/Remove programs, what it does is call this value and run it. You can do the same manually, for example with CutePDF if you run C:\Program Files (x86)\Acro Software\CutePDF Writer\Setup64.exe /uninstall from either the Run line or the command prompt, you will get the uninstaller. You could also find additional uninstall options by running the command with the /? switch, or run the following from the cmd prompt:

Cd C:\Program Files (x86)\Acro Software\CutePDF Writer
Setup64.exe /?

Note, this is a bad example as the switch does not return anything! But generally this will work, or you can just call the uninstaller manually this way. Now, let’s look at a possible problem with the Uninstall list, you will see some files that names in this format: {AFF7153F-C4AA-4C48-AEE9-8611D276CE86}

This is how a MSI installer writes its name to the Registry, instead of writing the friendly name an EXE installer writes, it writes its GUID.

This is not really a problem, as much as a difficulty in reading the keys. There are couple ways to read through these. One, there is a Value Name DisplayName that will have the more friendly value of (in this example) Quest ActiveRoles Management Shell for Active Directory (x64).

Another approach, is Windows writes a “compressed and hashed” version of the GUID to another part of the Registry.

To Hash the value, take the GUID {AFF7153F-C4AA-4C48-AEE9-8611D276CE86} and reverse each set of hex digits. AFF7153F becomes F3517FFA, C4AA becomes AA4C and on down the GUID until you have the following: {F3517FFA-AA4C-84C4-9EEA-68EC672D1168}

Now, drop the {, -, and } to get F3517FFAAA4C84C49EEA68EC672D1168. You now have the compressed and hashed GUID that you can compare to another key.

You should now be able to find this new GUID at the following location in the Registry: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products

And sure enough, there she is: The Key hashed

With the following keys: enter image description here

Again, you can then look in ProductName for the name of the application.

Bonus tip: You can launch the Add/remove programs by typing appwiz.cpl into the start search, run line or a command prompt.

Related Question