What condition should be used to run a custom action during install and repair only?

book

Article ID: 180395

calendar_today

Updated On:

Products

Symantec Products

Issue/Introduction

 

Resolution

Question
How do I  run a custom action during repair and install only?

Answer

1. From the Setup Editor> Dialogs> Locate the Maintenance Welcome Dialog.
2. Double click on the Next button to bring up its Edit Property window.
3.Select the Events Tab.  Press the Add button to the right of  the Publish Events.
4.In the Event field enter a public property name in square brackets (i.e. [PROPERTY] )
5. In the Argument field enter [MaintenanceMode]
6. In the Condition field Enter 1
7. Press OK and return to the MSI Script.

8.  Use the property,named in step 4 above, in a condition in the .MSI script to determine if a custom action should run.  

Example:
If NOT Installed AND <Property>="Repair" then
    Execute Custom Action
End Statement