Page 1 of 1
Creating IIS Website and Virtual Folder Sample
Posted: Wed Mar 11, 2009 7:34 pm
I just loaded this sample (nice sample BTW), and I have a question ... is there a way to pre-populate the IIS website and Virtual Folder for an UPGRADE (NEEDSUPGRADE is true)?
Right now if I run an upgrade install, it runs the previous uninstall, then installs the new version. It would be really nice if it could pre-select the previously selected IIS website and Virtual Folder .
I noticed that WEBSITE and FOLDER were marked as Persistant ... shouldn't they "rememeber" the previous values during an upgrade?
Thanks!
Posted: Wed Mar 11, 2009 9:35 pm
by MichaelNesmith
If the variables are marked as persistent variables, they indeed should remember their values upon restart. You can build on this sample to accomplish what you need.
Posted: Thu Mar 12, 2009 12:21 pm
Perhaps I am doing something wrong. If i just re-run the same setup program, the variables are indeed filled with the previous value.
But if I build a new version and run the setup (basically creating an "upgrade"), the previous website and folder are lost (and any other settings the user chose).
I am looking for a way to "remember" the previous choices from the prior version.
Will this require me to write these values to an .INI file and re-read them at startup (I can't use the registry).
Thanks!
Posted: Thu Mar 12, 2009 1:31 pm
Is this what the "Save Feature Selections" is for?
Posted: Thu Mar 12, 2009 1:36 pm
by MichaelNesmith
You can use INI files, also check the list of pre-defined script variables in help. I think one of them controls the loading of these values from prior versions as well.
Posted: Thu Mar 12, 2009 1:39 pm
I checked the "Pre-Defined Variables" section in the help but I did not see any that seem to control loading variables from previous versions. Do you know which one I should look at?
Thanks!
Posted: Thu Mar 12, 2009 1:43 pm
by MichaelNesmith
My mistake. Its not a pre-defined variable but a pre-defined compiler variable. Pasted from help for your convenience:
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.
Posted: Thu Mar 12, 2009 1:45 pm
Bingo! Thanks!