在ASP.NET Web应用程序做部署时,不仅需要判断IIS的版本,有时还需要判断操作系统的版本,以下步骤可以判断操作系统的版本信息。
限制只能在2000 Server或更高版本的系统上安装,不能在2000 profession上安装。
1,添加一个启动条件。
2,设置Condition属性的值为:VersionNT>=500 And MsiNTProductType=3
参考资料:
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
![None.gif](/Images/OutliningIndicators/None.gif)
Operating System Property Values
The following table displays values for selected operating system properties, including Microsoft Windows Server 2003 family, Windows XP, Windows 2000, Microsoft Windows NT version 4.0, Windows Millennium Edition (Windows Me), Windows 98, and Windows 95. For more information, see Released Versions of Windows Installer.
System | Version9X | VersionNT | WindowsBuild | ServicePackLevel |
---|---|---|---|---|
Windows 95 (Gold) | 400 | 950 | ||
Windows 95 + OSR | 400 | |||
Windows 95 + OSR2 | 400 | |||
Windows 95 + OSR2.5 | 400 | 1111 | ||
Windows 98 (Gold) | 410 | 1998 | ||
Windows 98 Second Edition | 410 | 2222 | ||
Windows Me | 490 | 3000.1 | ||
Windows NT 4.0 (Gold) | 400 | 1381 | ||
Windows NT 4.0 + Service Pack 1 | 400 | 1381 | 1 | |
Windows NT 4.0 + Service Pack 2 | 400 | 1381 | 2 | |
Windows NT 4.0 + Service Pack 3 | 400 | 1381 | 3 | |
Windows NT 4.0 + Service Pack 4 | 400 | 1381 | 4 | |
Windows NT 4.0 + Service Pack 5 | 400 | 1381 | 5 | |
Windows NT 4.0 + Service Pack 6 | 400 | 1381 | 6 | |
Windows 2000 | 500 | 2195 | ||
Windows 2000 + Service Pack 1 | 500 | 2195 | 1 | |
Windows XP | 501 | 2600 | ||
Windows XP + Service Pack 1 | 501 | 2600 | 1 | |
Windows Server 2003 family | 502 | Greater than 2600 |
MsiNTProductType Property
The installer sets the MsiNTProductType property for Windows NT, Windows 2000, and later operating systems. This property indicates the Windows product type.
For operating systems earlier than Windows 2000, the installer sets the following values.
Value | Meaning |
---|---|
1 | Windows NT work station |
2 | Windows NT domain controller |
3 | Windows NT server |
For Windows 2000 and later operating systems the installer sets the following values. Note that values are the same as of the wProductType field of the <?XML:NAMESPACE PREFIX = MSHelp /> structure.
Value | Meaning |
---|---|
1 | Windows 2000 Professional and later |
2 | Windows 2000 domain controller and later |
3 | Windows 2000 Server and later |
Remarks
This property is only available with Windows Installer version 2.0 and later.