PDA

View Full Version : how to remember options to use in maintenance



jimshatt
11-10-2003, 06:23 AM
Dear all :),

OnFirstUIBefore I ask my users if they want to use port 80 or 8080 with AskOptions. I then select and deselect certain features (invisible for the user).

All is well until the user wants to Modify the setup and selects other features (OnMaintenanceUIBefore).

My question is: how can I use the choice made OnFirstUIBefore. I think I should use some sort of property, but what and how?

Anyone?

akaStacy
11-10-2003, 08:49 AM
Normally you'd create a registry key on first install and then use it on modify. Also, if you have a feature that gets installed according to options selected (you say you select some features based on the choice) you can get the feature's state with FeatureIsItemSelected.

jimshatt
11-10-2003, 10:43 AM
Hmm, yeah, but, it's like this:

Lynx
|-Lynx80
|-Lynx8080

OnFirstUIBefore deselects Lynx80 or 8080 depending on AskOptions.
In Maintenance (modify) you can deselect Lynx and then select it again. Both Lynx80 and 8080 are then selected.
Now I want to deselect Lynx80 or 8080 according to the choice made the first time the setup was run.

I could do this with a regkey, but isn't there a way to remember my option somehow in the installer itself?

I tried using FeatureSetData and FeatureGetData, but this doesn't work, unfortunately.

DevinEllingson
11-10-2003, 02:39 PM
jimshatt,

You could use LogReadCustomString and LogWriteCustomString to read/write your own information to/from the setup's log file.

Devin Ellingson
InstallShield Software Corporation

akaStacy
11-10-2003, 03:32 PM
Why do you bother letting the end user to select that Lynx feature? Sounds like you're taking care of it in the script, maybe you should set it as not visible, then your problems with both of them being selected are solved...

jimshatt
11-11-2003, 05:06 AM
Thanks DavidEllingson! That's exactly what I need!

@akaStacy: The Lynx80 and Lynx8080 features are invisible, but the Lynx feature itself is not. Most people have their own browser they want to use... :)
But I need to make sure that when Lynx is selected in Maintenance only one of 80/8080 is installed.

Thanks for both of your help... I'm happy today :)

dbriggs
11-11-2003, 07:55 AM
I actually write selection information in my On*UIAfter events to a SETTINGS.INI file in the DISK1TARGET directory. I read the settings back in On*UIBefore. This is independent of any silent install response file issues (which you would not get for a normal install).

I also have a SETTINGS.INI in SRCDIR, so my only "problem" is making sure that I read the settings from the right place.

Hope that helps,

David