Sorry I've not undestood how to use persistent variable.
I've seen that the first reference of a variable in the script must be a 'Set Variable' or I get a runtime error of 'Attenpting to get value of undefined variable'.
But doing so I overvrite the persisted value that i can see in the debugger.
What's wrong in my usage ?
Persistent variable
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
You could say:
all the way on top of your script. This way the compiler will be happy, and the variable will not be overwritten on future runs of your script.
Note: The typical place for this type of first-time initialization in the setup code is the place marked:
in the setup script. Choose "Comments" on the left combo box and "First Time Install" in the right combo box (both located on top of your script, below the tabs) to quickly locate this place.
Code: Select all
if Variable MAINTENANCE Equals FALSE
Set Persistent Variable MYVARIABLE to VALUE
endNote: The typical place for this type of first-time initialization in the setup code is the place marked:
Code: Select all
Comment: First Time InstallMichael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/

