cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Dean_H
Level 7

How to configure CA to only run during install, not during uninstall

I have an InstallScript MSI Project that contains a custom action that executes an exe after all of the files are installed for the selected feature. I only want the CA to run during an installation, not during an uninstall, how do I configure the settings iwithin the Custom Action. I have attached a bitmap of the CA. I know that the Execution needs to be changed, but not sure how to get exactly what I want
Labels (1)
0 Kudos
(6) Replies
RobertDickau
Flexera Alumni

Please see, for example, this newsletter tip (PDF warning): http://www.acresso.com/webdocuments/PDF/msiconditions.pdf.
0 Kudos
Dean_H
Level 7

If I use the conditions "(Not Installed) AND (UILevel=5)", if an update is triggered, will this Custom Action run? I need this CA to run for New Install and Updates, but not during an Uninstall
0 Kudos
Happy_Days
Level 7

If its JUST the Uninstall where you do not want your CA to run, you can use the condition:

NOT REMOVE
0 Kudos
RobertDickau
Flexera Alumni

It partly depends on what you want to do with maintenance mode, minor upgrades vs. major upgrades, etc. Ignoring major upgrades, perhaps something like REMOVE<>"ALL" to detect anything but uninstallation (but allowing maintenance mode with partial uninstallation, for example)? With major upgrades there's UPGRADINGPRODUCTCODE, but that's another story.
0 Kudos
Dean_H
Level 7

Thanks for the suggestion Happy Days. The condition NOT REMOVE did the trick!
0 Kudos
Happy_Days
Level 7

You are welcome 😄
0 Kudos