IIS Launch Condition In Web Setup Project

2019-07-21 18:33发布

I'm developing Web Setup for my .NET 2.0 web application with VS 2005, and it has some prerequisites (.NET 2.0, Sql Server Express,and Windows Installer). My question is :how to check IIS launch condition before prerequisites?

1条回答
beautiful°
2楼-- · 2019-07-21 19:34

it work for me in VS2010.

in solution explorer, right click on Setup project. select View->Launch Condition.

in Search Target machine.

Add registry Search for Major version:

Name: Search for IIS Major Version  
Property: IISMAJORVERSION  
RegKey: SYSTEM\CurrentControlSet\Services\W3SVC\Parameters  
root: vsdrrHKLM  
Value: MajorVersion 

Add Registry Search for Minor version:

Name: Search for IIS Minor Version  
Property: IISMINORVERSION   
RegKey: SYSTEM\CurrentControlSet\Services\W3SVC\Parameters  
root: vsdrrHKLM  
Value: MinorVersion  

in Launch Conditions Add new Item with this value:

name: IIS Condition  
Condition: (IISMAJORVERSION >= "#5" AND IISMINORVERSION >= "#1") OR IISMAJORVERSION >= "#6"  
Message: This program need to IIS version 5.1 or above  
查看更多
登录 后发表回答