This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: installation feature selection, part 2
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 14, 2008
02:14 PM
installation feature selection, part 2
Okay - I am revisiting this, with more details.
First, the installer was to be created for command line use with msiexec and passing parameters:
VISTAGADGET=1
DESKTOPICON=1
When run with the command line, the above flags work correctly as there are features which are associated with components for the VistaGadget and DesktopIcon.
The components have conditions as follows:
VistaGadget condition: VersionNT=600 And WindowsBuild>=5600 and VISTAGADGET=1
DesktopIcon condition: DESKTOPICON=1
However, I also want to enable feature selection if the installer is run with the UI. Since the features related to the components, is there a way to have a selected feature set the above parameters appropriately? So if the user selects the "Vista Gadget" feature, I want the VISTAGADGET=1 parameter to be set so that the component gets installed correctly.
Thanks in advance,
Don Metzler
First, the installer was to be created for command line use with msiexec and passing parameters:
VISTAGADGET=1
DESKTOPICON=1
When run with the command line, the above flags work correctly as there are features which are associated with components for the VistaGadget and DesktopIcon.
The components have conditions as follows:
VistaGadget condition: VersionNT=600 And WindowsBuild>=5600 and VISTAGADGET=1
DesktopIcon condition: DESKTOPICON=1
However, I also want to enable feature selection if the installer is run with the UI. Since the features related to the components, is there a way to have a selected feature set the above parameters appropriately? So if the user selects the "Vista Gadget" feature, I want the VISTAGADGET=1 parameter to be set so that the component gets installed correctly.
Thanks in advance,
Don Metzler
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 14, 2008
03:41 PM
So i take it you've assigned the condition "VISTAGADGET=1" to the component under the vistagaget feature. I'd recommend that you instead use feature conditions. for example, lets say that the installevel for VistaGadget feature is 100. Set up two feature conditions as follows:
you could also use a control event on the "next" button of the "custom setup" dialog as follows:[CODE]Event Argument Condition
------------- -------- -----------------------------------------------------------
[VISTAGADGET] 1 &VistaGadget=3 OR (!VistaGaget=3 AND &Vistagaget<>2)
[VISTAGADGET] 0 NOT( &VistaGadget=3 OR (!VistaGaget=3 AND &Vistagaget<>2) )[/CODE]
Where vistaGadget is the name of the feature containing the Vistagadget component.
Level Condition
----- ---------
1 VISTAGADGET=1
200 VISTAGADGET!=1
you could also use a control event on the "next" button of the "custom setup" dialog as follows:[CODE]Event Argument Condition
------------- -------- -----------------------------------------------------------
[VISTAGADGET] 1 &VistaGadget=3 OR (!VistaGaget=3 AND &Vistagaget<>2)
[VISTAGADGET] 0 NOT( &VistaGadget=3 OR (!VistaGaget=3 AND &Vistagaget<>2) )[/CODE]
Where vistaGadget is the name of the feature containing the Vistagadget component.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2008
10:38 AM
Kelter wrote:
So i take it you've assigned the condition "VISTAGADGET=1" to the component under the vistagaget feature. I'd recommend that you instead use feature conditions. for example, lets say that the installevel for VistaGadget feature is 100. Set up two feature conditions as follows:Level Condition
----- ---------
1 VISTAGADGET=1
200 VISTAGADGET!=1
you could also use a control event on the "next" button of the "custom setup" dialog as follows:[CODE]Event Argument Condition
------------- -------- -----------------------------------------------------------
[VISTAGADGET] 1 &VistaGadget=3 OR (!VistaGaget=3 AND &Vistagaget<>2)
[VISTAGADGET] 0 NOT( &VistaGadget=3 OR (!VistaGaget=3 AND &Vistagaget<>2) )[/CODE]
Where vistaGadget is the name of the feature containing the Vistagadget component.
I think I understand what you have presented here. I will look at this.
Do you know if there is a property set internally to determine if the .msi is run via command line or UI?
Thanks,
Don
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2008
11:26 AM
Look into the UILEVEL Property. That will determine the level of UI which will help you as long as "command line" means silent install. Otherwise look for the existence of properties that would be set by the command line (suggest initializing said properties to bogus values)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2008
12:29 PM
Kelter wrote:
Look into the UILEVEL Property. That will determine the level of UI which will help you as long as "command line" means silent install. Otherwise look for the existence of properties that would be set by the command line (suggest initializing said properties to bogus values)
Thanks. I will look at this as well.
Don
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2008
03:08 PM
Just to elaborate a bit on what I had mentioned previously...
[CODE]Event Argument Condition
------------- -------- -----------------------------------------------------------
[VISTAGADGET] 1 &VistaGadget=3 OR (!VistaGaget=3 AND &Vistagaget<>2)
[VISTAGADGET] 0 NOT( &VistaGadget=3 OR (!VistaGaget=3 AND &Vistagaget<>2) )[/CODE]This stuff here is indended to set the property upon which the install state of the VistaGadget component's condition depends. Now you may be asking yourself, "WTF would you do that if a component without a condition will always be installed when it's parent component is to be installed?" And to you i'd say, that's a good question...and a reason why you should just stick with the feature conditions, and remove the condition from the component; however if you were to leave that condition there, then on a silent install, the feature would be enabled by default, and the component would be enabled or disabled by the property set on the cmd line.
The moral of the story is to stick with feature conditions. Only use component conditions when components within a feature depend on something other than whether or not the entire feature should be installed.
Refer to the help topic on Conditional Statement Syntax for details on the Feature Actions (&Featurename) and Feature States(!FeatureName), and the meanings of their enumerated values. Of course, you won't need that info for this particular problem since you're not going to need to set a value for a property upon which a component state depends since the component's state should depend only upon the state of its parent feature...which is the default behavior anyways. That's just my interpretation of the limited description of the problem at hand, but give it some thought, and feel free to challenge my assumptions. 🙂 I did try to make my assumptions known so that you'd know upon what my solutions were based.
Good luck!
Level ConditionJust to clarify, if VISTAGADGET=1 then the installlevel of that feature will be set to 1 and provided that the installlevel property is greater than 1, it will be included; or in the customsetup dialog, the feature will be initialized to be installed ("local" = 3). If VISTAGADGET!=1 then the installlevel of the feature will be set to 200, which would be higher than the default installlevel property, and would therefore not be included in a silent intall, or would be initialized as "Do not install" ("absent" = 2) on the custom Setup dialog.
----- ---------
1 VISTAGADGET=1
200 VISTAGADGET!=1
[CODE]Event Argument Condition
------------- -------- -----------------------------------------------------------
[VISTAGADGET] 1 &VistaGadget=3 OR (!VistaGaget=3 AND &Vistagaget<>2)
[VISTAGADGET] 0 NOT( &VistaGadget=3 OR (!VistaGaget=3 AND &Vistagaget<>2) )[/CODE]This stuff here is indended to set the property upon which the install state of the VistaGadget component's condition depends. Now you may be asking yourself, "WTF would you do that if a component without a condition will always be installed when it's parent component is to be installed?" And to you i'd say, that's a good question...and a reason why you should just stick with the feature conditions, and remove the condition from the component; however if you were to leave that condition there, then on a silent install, the feature would be enabled by default, and the component would be enabled or disabled by the property set on the cmd line.
The moral of the story is to stick with feature conditions. Only use component conditions when components within a feature depend on something other than whether or not the entire feature should be installed.
Refer to the help topic on Conditional Statement Syntax for details on the Feature Actions (&Featurename) and Feature States(!FeatureName), and the meanings of their enumerated values. Of course, you won't need that info for this particular problem since you're not going to need to set a value for a property upon which a component state depends since the component's state should depend only upon the state of its parent feature...which is the default behavior anyways. That's just my interpretation of the limited description of the problem at hand, but give it some thought, and feel free to challenge my assumptions. 🙂 I did try to make my assumptions known so that you'd know upon what my solutions were based.
Good luck!
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)