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

Calling a custom action

hello,
can anyone tell me in basic MSI project how to call a custom action only on modify. It should not be called during repair and remove and it should only be called during Modify.
i was trying the condition Installed AND _IsMaintenance="Change" but it is calling this cutom action during all the three condition Modify,Repair and Remove while i want to call it only during Modify.

thanks
Ashish
Labels (1)
0 Kudos
5 Replies
manomatt
Level 8

Hi,

For Remove
=========
Property(C): _IsMaintenance = Remove
Property(S): _IsMaintenance = Change

For Repair
========
Property(C): _IsMaintenance = Reinstall
Property(S): _IsMaintenance = Change

For Change
========
Property(C): _IsMaintenance = Change
Property(S): _IsMaintenance = Change

So you see that in all these cases the value server side property of _IsMaintenance is Change. I believe that you are running your CA during Execute seq. so the condition 'Installed AND _IsMaintenance="Change"' will get executed always, you have to rethink your strategy....
0 Kudos
ashish123
Level 3

Hi,
conclusions which you have made are absolutely correct i am using CA during Execute seq . so is their some keyword or condition which can be used to call a customa action only during "Modify". Is this possible in basic MSI project of installshield. Please help!!
0 Kudos
foerdi
Level 4

It is a private property, containing lowercase chars in its name, so you will need a public property to pass it to the server

store the value of _IsMaintenance during UI sequence MaintenanceType dialog in your own e.g. PUBLICPROPERTY with ControlEvent table (on Next button control) and don't forget to add your property to SecureCustomProperties. Then condition your CAs to your property
0 Kudos
ashish123
Level 3

hi,
can you please explain the process in detail as how to declare a publicproperty and use it as a condition to execute the custom action. and how this publicproperty is used in dialog on next button in event table.
0 Kudos
WalterT
Level 4

in property manager: set a property, for example, MYPROPERTY to a default empty value.
Add the string ;MYPROPERTY
at the end of SecureCustomProperties property in the property manager.

Go to dialogs, find MaintenanceType.
Go to behavior find the Next button, and add the event :
[MYPROPERTY] Argument 1 condition _IsMaintenance="Change"

Done

Go to your Custom Action and in the Install Exec Condition textbox, type MYPROPERTY=1
0 Kudos