Hi Amit,
Unfortunately the IIS launch condition cannot depend on a feature. However, you can try this approach:
- in the
Search page create a search which determines if IIS is installed or not (for example you can search for the "inetinfo.exe" and "w3wp.exe" files in the "[SystemFolder]inetsrv" folder)
- rename the search to something meaningful, for example IIS_SEARCH
- create a .VBS file which contains this code:
Code: Select all
Function Exit()
MsgBox("Feature4 requires IIS to be installed. The installation will stop")
Exit = 1602
End Function
- add the VBS file as an Attached custom action under "InstallExecuteSequence" -> "CostFinalize" as deferred
- in the
Custom Action Properties page set the "Function Name" field to "Exit" (the name of the function)
- set the "Expression" field in the "Execution Condition"field to:
Code: Select all
(NOT IIS_SEARCH) AND (&Feature4 = 3)
The custom action will show a message box with the specified text and it will return the value
1602. This value is seen by Windows Installer as an user exit, so the installation will be canceled. The condition of the custom action is true if the property of the search is empty (the search didn't find anything) and Feature4 is marked for installation. Therefore, the custom action runs if IIS is not installed and Feature4 was selected for installation.
Regards,
Cosmin
FOLLOW US
Get the latest news in Application Packaging