Creating IIS Website and Virtual Folder Sample

Got a problem you cannot solve? Try here.
Post Reply
[email protected]
Posts: 55
Joined: Wed Mar 11, 2009 5:26 pm
Contact:

Creating IIS Website and Virtual Folder Sample

Post by [email protected] »

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!
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
[email protected]
Posts: 55
Joined: Wed Mar 11, 2009 5:26 pm
Contact:

Post by [email protected] »

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!
[email protected]
Posts: 55
Joined: Wed Mar 11, 2009 5:26 pm
Contact:

Post by [email protected] »

Is this what the "Save Feature Selections" is for?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
[email protected]
Posts: 55
Joined: Wed Mar 11, 2009 5:26 pm
Contact:

Post by [email protected] »

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!
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
[email protected]
Posts: 55
Joined: Wed Mar 11, 2009 5:26 pm
Contact:

Post by [email protected] »

Bingo! Thanks!
Post Reply