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
-
- 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
end
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:
Code: Select all
Comment: First Time Install
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.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 48 guests