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
- :
- Disable a feature if IIS is not installed
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jan 31, 2008
10:43 AM
Disable a feature if IIS is not installed
Hello everyone,
I have a Basic MSI project with some features that require IIS to be installed. I'd like to disable the features if IIS is not installed...
I tried adding a condition to the features (like IIS_VERSION=''...) but cannot quite succeed...
Can someone please help me?
Thanx in advance
Paolo
I have a Basic MSI project with some features that require IIS to be installed. I'd like to disable the features if IIS is not installed...
I tried adding a condition to the features (like IIS_VERSION=''...) but cannot quite succeed...
Can someone please help me?
Thanx in advance
Paolo
(7) Replies
‎Jan 31, 2008
03:02 PM
Is this a web project or do you have a virtual directory in your project? I believe IIS_VERSION will be empty, if not.
Otherwise, if you create an MSI log file, is IIS_VERSION defined?
Otherwise, if you create an MSI log file, is IIS_VERSION defined?
‎Feb 01, 2008
02:20 AM
Hello Robert,
thanx for answering
I do have virtual directory (actually 3 vdirs) in my project and i have several components that get installed to the directories.
The project itself is a Basic MSI and not Web project, as I plan also to include in the same big project some regular windows apps and some services.
I was able to locate IIS_VERSION in system search (I guess IS did create it when I added the first vdir).
Also I was able to read the Msiproperty (IIS_VERSION) in a script I bound to a custom action (it actually returns a 2 char string with "#5", I guess that means major version of IIS is 5, if i run the same script on a IISless box I get empty string, which is fine).
What I really am struggling with is disabling my Web features if IIS is not installed... Tried adding a condition on the feature but to no avail, what I am missing?
Thanx
Paolo
thanx for answering
I do have virtual directory (actually 3 vdirs) in my project and i have several components that get installed to the directories.
The project itself is a Basic MSI and not Web project, as I plan also to include in the same big project some regular windows apps and some services.
I was able to locate IIS_VERSION in system search (I guess IS did create it when I added the first vdir).
Also I was able to read the Msiproperty (IIS_VERSION) in a script I bound to a custom action (it actually returns a 2 char string with "#5", I guess that means major version of IIS is 5, if i run the same script on a IISless box I get empty string, which is fine).
What I really am struggling with is disabling my Web features if IIS is not installed... Tried adding a condition on the feature but to no avail, what I am missing?
Thanx
Paolo
‎Feb 01, 2008
02:09 PM
What does your feature condition look like?
‎Feb 03, 2008
04:48 PM
Sounds like IIS_VERSION is being set properly, maybe use 'NOT' in your condition, like here?:
http://community.installshield.com/showthread.php?t=158303&highlight=IIS_VERSION+version+condition
http://community.installshield.com/showthread.php?t=158303&highlight=IIS_VERSION+version+condition
‎Feb 04, 2008
03:11 AM
Hello and thanx for answering,
I was (almost) able to achieve what I wanted.
I set the property INSTALLLEVEL to 50 for the project and the installlevel for the web features to 100.
Added a condition to all three web features with Level 100 and condition ((IIS_VERSION="#5") OR (IIS_VERSION="#6") OR (IIS_VERSION="#7")) and this works if IIS is detected then the features are selected for installation, if iis is not detected they are not, fine.
What I didn't know is that if user selects custom installation he/she is still able to select the web features even if IIS is not there!!!
What I'd like to do is to disable (even in custom mode) the option to install the web features if IIS is not installed on the box... Is this possible???
Thanx in advance
Paolo
I also discovered that if I choose Complete install the web features are installed even if IIS is not on the box. So what are the conditions on features for? If I choose complete they are installed even if the conditions evaluate to false... If I choose custom they are shown as not installed (red X) but I still can install them... I must be missing something :confused:
I was (almost) able to achieve what I wanted.
I set the property INSTALLLEVEL to 50 for the project and the installlevel for the web features to 100.
Added a condition to all three web features with Level 100 and condition ((IIS_VERSION="#5") OR (IIS_VERSION="#6") OR (IIS_VERSION="#7")) and this works if IIS is detected then the features are selected for installation, if iis is not detected they are not, fine.
What I didn't know is that if user selects custom installation he/she is still able to select the web features even if IIS is not there!!!
What I'd like to do is to disable (even in custom mode) the option to install the web features if IIS is not installed on the box... Is this possible???
Thanx in advance
Paolo
I also discovered that if I choose Complete install the web features are installed even if IIS is not on the box. So what are the conditions on features for? If I choose complete they are installed even if the conditions evaluate to false... If I choose custom they are shown as not installed (red X) but I still can install them... I must be missing something :confused:
‎Feb 04, 2008
09:48 AM
Thanx for answering and being patient 😄
I managed to make it all work adding a condition that sets INSTALLEVEL to 0 when ((IIS_VERSION<>"#5") AND (IIS_VERSION<>"#6") AND (IIS_VERSION<>"#7"). So the web features will be installed (if user selects complete) or available to be installed (if user selects custom) only if IIS is there...
Right now I'm battling with services not being uninstalled...
Ciao
Paolo
I managed to make it all work adding a condition that sets INSTALLEVEL to 0 when ((IIS_VERSION<>"#5") AND (IIS_VERSION<>"#6") AND (IIS_VERSION<>"#7"). So the web features will be installed (if user selects complete) or available to be installed (if user selects custom) only if IIS is there...
Right now I'm battling with services not being uninstalled...
Ciao
Paolo