Active1 year, 9 months ago
Feb 16, 2011 I've been playing around with custom actions and messed up the uninstall custom action. The problem is that the original MSI doesn't exist anymore, but when I try to uninstall (via Add/Remove Programs, or directly via msiexec), the uninstall fails and I can't remove the product.
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.
- Msiexec is command prompt software that installs an MSI program. But I have found that you can install an MSI file from the command line by just typing in the name of the MSI file on the command li.
- The Silent Install options for the Windows installer (msiexec) /quiet, /q, qn: Fully silent mode. Silently uninstall the msi package by the product code: msiexec /x.
- Oct 14, 2008 I would like a quiet Uninstall. I’ve tried /quiet and /qr /quiet does not do anything. There are no errors, and the files are not uninstalled /qr shows the progress bar etc as if it is installing /qr /x Does not work, Windows installer shows a dialog with the run options. /qr /uninstall.
5093 gold badges8 silver badges18 bronze badges
2 Answers
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 FilesApplication
folder to trick the installers into thinkEverything 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.
Everything you see in add and remove programs (XP, Vista, 7 confirmed) is written to the registry at HKLMSOFTWAREMicrosoftWindowsCurrentVersionUninstall as a subkey.
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 SoftwareCutePDF WriterSetup64.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: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.
Uninstall Msi Without Original Msi
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.
Msiexec Repair
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_MACHINESOFTWAREClassesInstallerProducts
And sure enough, there she is:
With the following keys:
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.Msiexec Force Uninstall Command
Scott17.3k11 gold badges48 silver badges92 bronze badges
Austin T FrenchAustin T French
It is 2017 now, I found a better way of force uninstall an application without msi.
Download the Microsoft tool from
Run it => Uninstall => Select the program => Done
![Msiexec force uninstall software Msiexec force uninstall software](/uploads/1/2/4/8/124805032/134220931.jpg)
With this there is no need to touch registry and no need to download third party tools that may contains Malwares.
AdamYangAdamYang
![Command Command](/uploads/1/2/4/8/124805032/715834600.jpg)