cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Shark75
Level 4

Setup requires IIS when not installing optional IIS component

We recently added an optional IIS feature to our InstallScript installation and have discovered that if you don't select the IIS feature (as it's optional) you still need IIS installed for the other features otherwise you get an error message that says "This setup requires Internet Information Server 4.0 or higher for configuring IIS Virtual Roots. Please make sure that you have IIS 4.0 or higher."

How do we fix this as we do not want this error to come up when not installing the IIS features? I've found posts regarding MSI projects and custom actions, but we're using InstallScript not MSI so don't have the option to use custom actions.

P.S. We are using InstallShield 2012!
Labels (1)
0 Kudos
(1) Reply
Shark75
Level 4

It appears that I can workaround this issue by overriding the following InstallScript functions like so so that they only do what they do if the feature that has IIS in it has been selected...
function int OnIISInitialize()
string szSettingsFile;
string szRuntimeFile;
begin
if (FeatureIsItemSelected(MEDIA, "My Web Feature") = TRUE) then
// Initialize IIS runtime
szSettingsFile = SUPPORTDIR ^ IISRT_INI;
szRuntimeFile = SUPPORTDIR ^ IISRT_DLL;
return IISRTInitialize( szSettingsFile, szRuntimeFile );
else
return ISERR_SUCCESS;
endif;
end;


function int OnIISComponentInstalled(szComponent)
begin
if (FeatureIsItemSelected(MEDIA, "My Web Feature") ) = TRUE) then
return IISRTComponentInstall( szComponent );
else
return ISERR_SUCCESS;
endif;
end;


It's also odd that we don't get this with another product installation that has a similar selectable IIS feature.

The installation that has the problem has NT Service object components. We know there have been previous InstallShield bugs regarding using NT Service objects and IIS in the same installation so perhaps there are some more bugs still in there.
0 Kudos