QuestionHow do I perform an uninstall of an .msi without using the Upgrade Method within another .msi?
Answer
To remove an .msi from within another .msi, you should use a custom action to run msiexec.exe to perform the uninstall.
Use the Execute Program from Destination to call an .msi within another .msi to perform uninstall:
- Add an Execute Program from Destination custom action in the User Interface of MSI Script after CostFinalize.
- The Execute Program from Destination custom action dialog appears. Fill in the following information:
- Custom Action Name: Enter a name.
- Working Directory: Enter SystemFolder
- EXE and CommandLine: Enter the msiexec.exe /x {PRODUCTCODEOFMSITOUNINSTALL.EN_US}
- Accept all other defaults and click OK.
If you want the .msi to perform a silent uninstall, then add this following syntax in the EXE and CommandLine field.
msiexec.exe /i {PRODUCTCODEOFMSITOUNINSTALL.EN_US} REMOVE="ALL" /q