cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Webster
Level 3

Custom action to run at uninstall time only?

I would like to create a custom action that should only run at uninstall time and that only performs the uninstall if a different application is not also installed. What is the best way to achieve this? I.e. What is the best way to check if the other application is installedand then how do I enure that the custom action only runs at uninstall time and not also at install time?:confused:
Labels (1)
0 Kudos
(3) Replies
Christopher_Pai
Level 16

Do the two products have any shared / overlapped components? If so, the easy / best way is to author a shared component and use the action state of that component in a condition. That way the CA only fires when the component is being removed and the component is only removed when the last product is removed.

Short of that, you'll need a System Search to detect whether the other product is installed and then use a condition like REMOVE="ALL" and Not SOMEPRODUCTFOUND so that the CA only fires when the other product is not found by the system search and this product is being removed.

Depending on what the CA does, there's also always the possibility that it isn't needed anyways.
0 Kudos
Webster
Level 3

Hi Christopher,

thank you for the reply. Does that mean i can get away without writing a custom action? Which would be good!:)
0 Kudos
Christopher_Pai
Level 16

You never said what your custom action is doing so it's hard for me to say if it's actually needed or not.
0 Kudos