Summary
This article will discuss the conditions and sequence position to use to launch a custom action when uninstall is selected through Add/Remove Programs (ARP).
Synopsis
This article will discuss which conditions to use to launch a custom action when uninstall is selected through Add/Remove Programs (ARP). The purpose of this would be to not launch the same custom action if uninstall was performed through maintenance mode.
Discussion
We must first understand the difference between an uninstall that occurs from ARP as opposed to through Maintenance Mode.
When an uninstall occurs through ARP, Windows Installer will automatically set the property UILevel=3 . This is a basic User Interface which will only handle simple progress and error handling.
When an uninstall occurs through maintenance mode the Windows Installer will set the property to UILevel=5. This is a full User Interface.
With this in mind we must be careful not to place the custom action in the User Interface Sequence, as this will not be launched during an ARP uninstall.
Additional conditions that we can use are REMOVE="ALL". This option will work in the execute sequence after InstallValidate to detect a complete uninstallation. Mind the capitalization and quotation marks.
Finally to prevent a silent uninstall caused by a Major Upgrade meeting the above 2 conditions we can also use "NOT UPGRADINGPRODUCTCODE"
Therefore the custom action should be placed after Installvalidate in the Execute Sequence and its full condition would be:
REMOVE="ALL" AND UILevel=3 AND NOT UPGRADINGPRODUCTCODE
Additional Information
UILevel Property
http://msdn.microsoft.com/en-us/library/aa372096(v=vs.85).aspx
REMOVE Property
http://msdn.microsoft.com/en-us/library/aa371194(v=vs.85).aspx
UPGRADINGPRODUCTCODE Property
http://msdn.microsoft.com/en-gb/library/aa372380(v=vs.85).aspx
Further details on REMOVE="All" Property:
http://www.robertdickau.com/msi_tips.html
Related Articles
Windows Add/Remove Programs lists MongoDB 4.2.13 after Snow License Manager 9.27.1 upgrade 40Number of Views How to Configure a Major Upgrade 6Number of Views PowerShell cmdlet get-property Used in a Custom Action 6Number of Views Launch a Custom Executable 16Number of Views Launch an Executable Using a Custom Action 3Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago