I was inspired to write this post when a colleague of mine approached me today asking how to uninstall a previous version of an MSI and install a newer version. While this doesn’t directly tie int to OS Deployments, the need to uninstall & reinstall applications deployed on the estate is a very common task amongst Enterprise Solutions Administrators. Unfortunately, there isn’t a single command you can run from MSIEXEC which will find and destroy all older versions of an application. To do this, it would require the use of WISE packaging studio, or some other app packaging program.
One of the easiest methods for uninstalling an MSI is to use the /x command. Here is an example below.
msiexec /x “c:\vmtools\VMware Tools.msi” /qn /norestart /log c:\toolsUnInstall.log
However, what if you find yourself in the scenario where you don’t have the MSI of the older version you’re trying to uninstall. Luckily, that information can be found in the REGISTRY.
The information can be found at: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
There should be the product ID there as well as a direct command you can run to uninstall the software.