Uninstall should check that ProductCode is installed on TargetMachine before calling msiexec /x


When using the Uninstall task directly (rather than through the Deploy task), it executes msiexec /qn /x ProductCode. This fails on a machine that does not have the product code installed. This is because msiexec throws up a message box saying that you can't uninstall something that isn't installed. With quiet mode, this just fails.
For a team build scenario, there are often times when a new build/product comes along. When the process attempts to install the msi the first time for a target machine, the build will always fail. I think this activity should use similar logic to Deploy where it resolves the ProductCode from a ProductName. The Uninstall task should search the target machine registry to see if the package is installed before calling out to msiexec /x.
The next time a build kicks off, the package is installed, the product code will be in the registry and the uninstallation will then be invoked.
Closed Jun 23, 2010 at 3:18 AM by mikedouglas
added check in Deploy activity to only uninstall if the product is installed on the target.


mikedouglas wrote Jun 15, 2010 at 4:08 AM

Great suggestion! I agree this is the way it should work. I'll get this implemented in the next release.


wrote Jun 23, 2010 at 2:00 AM

wrote Jun 23, 2010 at 3:17 AM

wrote Jun 23, 2010 at 3:18 AM

wrote Feb 14, 2013 at 1:47 AM

wrote May 16, 2013 at 6:43 AM