Hi Steve,
Unfortunately Windows Installer doesn't support stopping a custom action from another installer. However, you can try this workaround:
- use the project of the original package to modify the custom action condition
- rebuild the old package with the modified condition
- create a new project for a new installer (this will be an update to the original install)
- in this new installer add the modified old MSI in the "Files and Folders" page (preferably in the "Temporary" folder)
- in the
Custom Actions page create a new
Exe with working Dir custom action under "InstallExecuteSequence" -> "Install"
- set "SystemFolder" (Windows Volume\Windows\System) as the working directory
- configure it to run a command which looks like this:
- where you replace
[#package.msi] with a reference to the MSI you added in the project (you can use the "Edit..." button to add it)
- make sure that the
Asynchronous execution, do not wait for return option is used
- under "InstallExecuteSequence" -> "InstallFinalize" add another "Exe with working Dir" custom action
- set "SystemFolder" as the working directory
- configure it to run this command:
- make sure that the "Asynchronous execution, do not wait for return" option is used
- set the custom action condition to:
- in the
Install Parameters page enable the "Limit to basic user interface (simple progress and error handling)" option
When this new package runs on the target machine it will copy the modified old MSI into a folder. From there the first custom action will recache the old MSI to fix the uninstall custom action. The second custom action will uninstall the new package, removing the copied MSI. Also, everything is done using progress bars, so it look like an update is being performed.
Regards,
Cosmin
FOLLOW US
Get the latest news in Application Packaging