PDA

View Full Version : Features



slimboywynn
07-14-2005, 08:03 AM
Can a checkbox set a feature to be installed, if so how?

linder
07-14-2005, 08:13 AM
Hello,

The "Custom Install" dialog can set Features and Sub-Features. At the moment there is no other script function to set a Feature at run-time.

What exactly do you have to do?

Thanks,

slimboywynn
07-14-2005, 08:33 AM
Ok I want the user to be able to select to install Data, but only if they select to install Standalone or Server from the list of types that I have. I was hoping to create a Data feature which I can then say "Install Data Feature" by means of a checkbox later in the script, such as after the main installation.

Suggestions welcome :)

linder
07-14-2005, 08:45 AM
Absolutely no problem :) You can use the %_SB_SETUPTYPEID% variable here.

For example, something like the following:

If %_SB_SETUPTYPEID% Equals 'Standalone' Then
Set Variable %INSTALL_DATA_FEATURE% to "1"
Else Set Variable %INSTALL_DATA_FEATURE% to "0"
End

Then later in your script, use the above variable to find out whether or not to display the dialog with the "Install Data Feature" checkbox (1 means display the dialog, 0 means do not display).

Based on the checkbox result, install the files or not. You only have to pt a If..Then..End around the file to be installed.

If you need a demo script please let me know and I will develop it for you.

slimboywynn
07-14-2005, 09:40 AM
So I can still set the files to be installed for Sample Data as a feature, but place the IF and END in the script around these files???

linder
07-14-2005, 09:44 AM
If you add that Sample Data Feature to the "Standalone" and "Server" setup type, then the answer is yes.

Does this help?

Thanks,

slimboywynn
07-14-2005, 10:06 AM
I've not done that, I've created a Sample Data feature type, added all the files I want to that feature and in the script I've placed an IF and END around that group of files to be installed.

Would have been nice to have just set SAMPLEDATAFEATURE is TRUE tho ;)

linder
07-14-2005, 10:16 AM
In your case, I think if you mark the SAMPLEDATAFEATURE "Install By Default" checkbox then it should also work :)

slimboywynn
07-14-2005, 10:17 AM
I now see what you're saying Friedrich, I must add my Sample Data Feature to those Setup Types in order for it to be 'selected' as such.

On another note, I want a dialog with 2 checkboxes sometimes and a 3 checkboxes at other times, but the first 2 checkboxes are the same. Is the only way around this to have 2 dialogs??? Which is what I've done, hiding and showing each in turn, but just checking there isn't an easier way.