Property Values not retained between dialogs. - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

wyzerd
Posts: 75
Joined: Tue Mar 27, 2007 3:54 am
Location: St. Louis, MO
Contact: Website

Property Values not retained between dialogs.

I have recently discovered that assigning a value based on a dialog control is lost after the dialog changes.

To illustrate my problem I have created a 1 file install.

The Property under Install Parameteres->Properties is

"YourProperty" Value is "Your Value"

On the Verify Ready Dialog, I created "CheckBox_1" with Property "CHECKBOX_1_PROP"
With Published events

[YourProperty] -> False Value -> AI_INSTALL AND (not CHECKBOX_1_PROP)
[YourProperty] -> True Value -> AI_INSTALL AND (CHECKBOX_1_PROP)
DoAction -> ReadProp_UI -> AI_INSTALL

When I change the state of the CheckBox, The ReadProp Displays a message box containing Session.Property("YourProperty") toggling back and forth between True Value and False Value
However, Calling this same function on event MoveFiles later on shows "Your Value"

How do I save this value to use it at a later point in the install?

I am including the 2 files that this sample makes up.

Since vbs is blocked, I will include it below:

Code: Select all

option explicit
    
Public function ReadValues()
    Display "YourProperty"
end function

private sub Display(strVal)
    msgbox strVal & ": " & Session.Property(strVal)
end sub
Thanks!!
Attachments
good.PNG
good.PNG (829 Bytes) Viewed 5041 times
Sample.aip
(9.53 KiB) Downloaded 364 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Property Values not retained between dialogs.

Hi,

This happens because you are using a private property (contains lowercase letters in its name). Private properties are designed for the installation UI and use their default values when accessed in InstallExecuteSequence. Try using a public property, for example YOUR_PROPERTY.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
wyzerd
Posts: 75
Joined: Tue Mar 27, 2007 3:54 am
Location: St. Louis, MO
Contact: Website

Re: Property Values not retained between dialogs.

Cosmin!

Thanks! This has been driving me batty for 2 days. Works like a dream.

Return to “Common Problems”