Persistent Variable not being persistent.

Got a problem you cannot solve? Try here.
Post Reply
albel
Posts: 20
Joined: Thu Jun 11, 2009 3:45 pm

Persistent Variable not being persistent.

Post by albel »

Hi,

I can not seem to get the 'Remember value when restarting setup' option to work on a variable. I would like to use the last value of it during the uninstall, but displaying its contents in a message box shows it to be empty when uninstalling. It actually had a value during setup because it passes the value to a custom program which successfully writes it to a database.
I've definately got the check box checked because the variable is called a 'Persistent Variable' in the script.

Does another setting need to be adjusted to recall the value?
Any ideas?

Thanks,

ab
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Make sure you are not re-initializing the variable value by executing Set Variable again during a maintenance or uninstall script flow. Check that MAINTENANCE=FALSE before calling Set Variable on it, there's a place in the default script where this check is already performed so you could just inject your persistent declaration code there.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
albel
Posts: 20
Joined: Thu Jun 11, 2009 3:45 pm

Post by albel »

Hi michael,

The MAINTENANCE conditional got it to work.

Thanks again.

ab
Post Reply