You've probably come across times when you need to deploy an application, but before you can install it, you need to make sure another application is uninstalled. Maybe the other application is a previous version of the new application or just something that isn't compatible with the new application. Or maybe you just need to remove an application from a system without installing anything new. I put together this steps to handle these situations and have used it many times.
Here the Action of a Batch file is to Uninstall an Application through product code.
We can change this command line according to our requirements.
msiexec.exe /x{00000000-0000-0000-0000-000000000000} /qb!
Call this batch file through a custom action.
Click to view.