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: How to prevent a feature from being installed?
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
‎Dec 02, 2009
01:16 PM
How to prevent a feature from being installed?
Our Basic MSI has a feature that we do not want installed if the OS is a Windows Server (MsiNTProductType<>1). Setting a condition on a feature to raise the install level only deselects the feature on the CustomSetup dialog. This does not stop the user from selecting the feature or from installing the feature from the command line during a silent install.
Any suggestions?
Any suggestions?
(3) Replies
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 03, 2009
03:33 AM
Create an install script custom action; code is below;
MsiSetFeatureState(ISMSI_HANDLE,"YourFeatureName",INSTALLSTATE_ABSENT);
call this before feature migrate state
It works with /qn option also.
MsiSetFeatureState(ISMSI_HANDLE,"YourFeatureName",INSTALLSTATE_ABSENT);
call this before feature migrate state
It works with /qn option also.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 03, 2009
11:41 AM
better solution: Have the condition set the InstallLevel of the feature to "0". Then it won't show up in CustomSetup at all.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 03, 2009
10:13 PM
That is exactly what I'm looking for. Thanks.
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)