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

Custom Action to set a property

Hi I'm having problems while creating a custom action in installShield, hope you can help me!

I have one msi lets call it (MainInstall.msi), in wich I add one merge module (AddModule), this merge module contains many components but just one of those components has to be installed.

For that I have one condition
Example: if the value of the property "PrCode" is equal to "Brenda" the component "A" will be installed.
My problem is that I need to set the value of the property "PrCode",in the main program( MainInstall.msi) and the one that use that value is the merge module (AddModule).

My question is, is there any way to set the value of the PrCode property from the mainInstall, if where I use it is in the Merge module?
I tried to do with custom actions but... nothing!!

Please can you help me?
Labels (1)
0 Kudos
2 Replies
KathyMorey
Level 10

IS automatically adds the merge module's GUID to any property created in the merge module, to prevent properties in the main install being overwritten by accident. You should be able to set the merge module property specifically by setting, for example, "PrCode.GUID" in your main install.
0 Kudos
Br3nda
Level 3

KathyMorey wrote:
IS automatically adds the merge module's GUID to any property created in the merge module, to prevent properties in the main install being overwritten by accident. You should be able to set the merge module property specifically by setting, for example, "PrCode.GUID" in your main install.


Thank you Kathy,

You gave me some clues with your answer!

Finally I arrived to do it as follows:

In the merge module, I created direclty in the Property Table, one property named "PRCODE" Attention: (all uppercase) like that you create a global property that can be use with more liberty.
When I created the property, an ID_STRING was generated so, instead of modify the property's value you modify the ID_STRING.

After in my main program (msi) I create another property in the same way. This time I named it: PRCODE2.

To give to PRCODE the value that contains PRCODE2, I created a "Set Property" custom action with this syntax:

Property Name: PRCODE (property declared in the merge module)
Property Value: [PRCODE2] (Property declared in the msi)

And that's it

Hope it helps to someone else.

Br3nda
0 Kudos