Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Run custom action only during uninstall


3 replies to this topic

SOWI

SOWI
  • Full Members
  • 29 posts

Posted 11 November 2002 - 16:23

We have several merge modules inside our main setup.
One of the merge modules runs a custom action to do some clean up stuff during the uninstallation. To do that the custom action calls an installed executable on hard disk after the DeleteService sequence (So the file is still there).
The only condition for the custom action is "Installed" to avoid the call during the installation.

Now we have following problem.
We run the main setup and remove the feature the merge module belongs to. So the required files are not on hard disk.
Now we try to uninstall. During the uninstall the setup tries to run the CA even the feature was not selected during install and fails (The required file is not there!!). To get the software removed successfully we have to perform a "Modify" first to install the feature.

How can we avoid the problem in an easy way. Does anyone know a condition that can be applied to the custom action?
Frank Dering

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 November 2002 - 19:26

Installed is also TRUE during a repair operation, so that's probably not what you want. Use a condition like &FeatureName=2 (for details see MSI help topic Conditional Statement Syntax)

SOWI

SOWI
  • Full Members
  • 29 posts

Posted 15 November 2002 - 08:45

Thank you for your hint. I could solve my problems by adding a condition to the component.

A problem could be that merge module component names containing a GUID at the end of the name.
The conditon "(!Component=2)" won't work. A condtion like
"(!Component.2655E9BF_5287_46b3_9C3C_FC95F91C7E01=2)"
has to be used instead of.
Frank Dering

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 26 November 2002 - 21:43

Yes, that's correct. Append the module GUID (remove the curly braces and convert dashes to underscores) to the component name, separated by a dot.