I have a pretty complex installer with many selectable features.
When an application is being uppgraded the "Prevoius version uninstallation" is invoked which of course uninstall the current package.
Is there now a way of preserving the state(s) of the uninstalling/uninstalled package so it can be used as default for the upgrade?
The point would be to avoid unwanted components to be installed and also not to miss a previously selected component by mistake.
Preserve feature states on upgrades
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Re: Preserve feature states on upgrades
Pre-Defined Compiler Variables
LOADOLDDATA: If set to TRUE, the setup engine will load feature definitions and other saved data (see the Load Feature Selections command for more details) from an older version of setup. Normally this data is loaded only in between the same versions of setup, when working on the same installed application version for a maintenance or uninstall operation. With any other value for this compiler variable, this normal behavior is preserved.
Michael 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/
Re: Preserve feature states on upgrades
Brilliant! I 'll give this a try right away! 
Re: Preserve feature states on upgrades
Nope, can't get this to work at all.
I've declared a persistent variable but this is never seen as declared.
The test always returns FALSE (see attached image).
My scenario:
I compile my installer and run it.
The installer show a dialog with this var's current value (FALSE as default).
I change the state to TRUE through a radio button and also check the state with a message box just to be 100%.
I then recompile the installer in order to get a new revision and run it again.
I get the "Previous version uninstallation.."- message" indicating a new version of the same product.
I continue the installation expecting my variable to be persistant and set to TRUE, just as I left it.
But installer still show FALSE and the "If defined"-test evaluates to false which indicates that the variable doesn't persist?
Any clues?
I've declared a persistent variable but this is never seen as declared.
The test always returns FALSE (see attached image).
My scenario:
I compile my installer and run it.
The installer show a dialog with this var's current value (FALSE as default).
I change the state to TRUE through a radio button and also check the state with a message box just to be 100%.
I then recompile the installer in order to get a new revision and run it again.
I get the "Previous version uninstallation.."- message" indicating a new version of the same product.
I continue the installation expecting my variable to be persistant and set to TRUE, just as I left it.
But installer still show FALSE and the "If defined"-test evaluates to false which indicates that the variable doesn't persist?
Any clues?
- Attachments
-
- Persistent...
- IA.png (3.61 KiB) Viewed 6756 times
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Re: Preserve feature states on upgrades
It's a compiler variable, not a script variable 
Michael 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/
Re: Preserve feature states on upgrades
Ok....
Two follow ups then...
1 - Is this compiler variable required for persistent variables?
2 - How the heck do I go about setting a comp var?
Two follow ups then...
1 - Is this compiler variable required for persistent variables?
2 - How the heck do I go about setting a comp var?
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Re: Preserve feature states on upgrades
1. No.
2. Project Options dialog.
2. Project Options dialog.
Michael 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/
Re: Preserve feature states on upgrades
Thanx, found it and I've set it to True.
Well, it seems this done the trick..
Looks like the persistent variable needed LOADOLDDATA anyway...
When is "data" considered old?
Is it when Revision Code is changed (by recompilation) or when the Product Version changes or both?
Well, it seems this done the trick..
Looks like the persistent variable needed LOADOLDDATA anyway...
When is "data" considered old?
Is it when Revision Code is changed (by recompilation) or when the Product Version changes or both?
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Re: Preserve feature states on upgrades
Persistent variables are not automatically reloaded when running a different version (as identified by an updated revision code). They persist only in a single version of your installation. The compiler variable helps you reload them in different versions too, of course.
Michael 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/

