PDA

View Full Version : Property Values Gone in Execute Sequence



RPatML
02-04-2004, 01:12 PM
Property Values Gone in Execute Sequence


DevStudio 9 SP1
Basic MSI
VBScript custom actions


We have quite a few properties defined in Property Manager. These all have default or initial values. At various locations throughout the Installation -> User Interface sequence, we change the property values to indicate certain conditions of the overall installation.

Then when the installation enters the Installation -> Execute sequence all the property values are gone. Nothing.

Is this correct behavior?

We need these same property values in the Installation -> Execute sequence. So, how do we make this work?

Thanks.

RobertDickau
02-04-2004, 01:19 PM
Only the values of public properties---those with all-uppercase names---are preserved when execution switches from the UI sequence to the Execute sequence; private properties (whose name contains at least one lowercase letter) are reset between the sequences.

In addition, if you're trying to get property values during deferred execution, you need to do a little more work to get the property value; please see, for example, this InstallShield newsletter article: http://www.installshield.com/news/newsletter/0308-articles/CustomActionData.asp.

P.S. This last point is also discussed in Chapter 4 of Bob Baker's new book Practical Windows Installer Solutions for Building InstallShield Setup Applications, about which see www.installshield.com/ispress.

RPatML
02-05-2004, 11:21 AM
Thanks for the reply. It was good information. I have a question regarding the technical article you pointed me to.

The article explained how to make one public property available in a custom action in the execute sequence. Is it possible to make more than one public property available in the same custom action in the execute sequence?

Thanks.

RobertDickau
02-05-2004, 12:21 PM
For one approach, please see InstallShield KB article Q104413, at http://support.installshield.com/kb.