开发者

Checking in WiX if the OS is Windows 2003 (32 bit or 64 bit ) or Windows 2008 (64 bit)

I am writing a WiX installer which should install开发者_运维问答 only on Windows 2003 (32 or 64 bit) or Windows 2008 (64 bit only). I have the below condition, but it isn't working. Why?

Installed AND (VersionNT = 502 OR (VersionNT = 600 AND VersionNT64 > 0))


Try the following condition:

VersionNT = 502 OR (VersionNT = 600 AND VersionNT64)

The first part selects Windows Server 2003 (any), the second part selects Windows Server 2008 x64 (as well as Windows Vista).

Your launch condition must evaluate to true for installer to launch. Installed property will be set only when your product is already installed.


You may want to include the check that your package is installed on a server OS:

MsiNTProductType > 1

See the table of Operating System property values. See description of MsiNTProductType property.


Try this code

<Package InstallerVersion="200" Compressed="yes" Platform="x64" />

Add the above code in Product.wxs file. The number is calculated as major * 100 + minor. So 2.0 is 200, 3.0 is 300, 4.5 is 405 and 5.0 is 500.

Hence as per you requirement you can set the number in InstallVersion property

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜