Подтвердить что ты не робот

Как проверить систему на Windows 7 или Windows Server 2008 R2 в Wix Installer?

Я работаю над проектом установщика Windows. И теперь я хочу, чтобы программное обеспечение можно было установить только в системе Windows 7 или Windows Server 2008 R2, я попытался использовать это:

<Condition Message='Windows Server 2008 R2 or Windows 7 is required'>(VersionNT = 600 AND ServicePackLevel = 1) OR VersionNT = 601 </Condition>

но он все равно может быть установлен в Windows Vista. Пожалуйста, помогите!

Спасибо!

4b9b3361

Ответ 2

Смотрите здесь для примера

<Condition Message='Windows 95'>Version9X = 400</Condition>
<Condition Message='Windows 95 OSR2.5'>Version9X = 400 AND WindowsBuild = 1111</Condition>
<Condition Message='Windows 98'>Version9X = 410</Condition>
<Condition Message='Windows 98 SE'>Version9X = 410 AND WindowsBuild = 2222</Condition>
<Condition Message='Windows ME'>Version9X = 490</Condition>
<Condition Message='Windows NT4'>VersionNT = 400</Condition>
<Condition Message='Windows NT4 SPn'>VersionNT = 400 AND ServicePackLevel = n</Condition>
<Condition Message='Windows 2000'>VersionNT = 500</Condition>
<Condition Message='Windows 2000 SPn'>VersionNT = 500 AND ServicePackLevel = n</Condition>
<Condition Message='Windows XP'>VersionNT = 501</Condition>
<Condition Message='Windows XP SPn'>VersionNT = 501 AND ServicePackLevel = n</Condition>
<Condition Message='Windows XP Home SPn'>VersionNT = 501 AND MsiNTSuitePersonal AND ServicePackLevel = n</Condition>
<Condition Message='Windows Server 2003'>VersionNT = 502</Condition>
<Condition Message='Windows Vista'>VersionNT = 600</Condition>
<Condition Message='Windows Vista SP1'>VersionNT = 600 AND ServicePackLevel = 1</Condition>
<Condition Message='Windows Server 2008'>VersionNT = 600 AND MsiNTProductType = 3</Condition>
<Condition Message='Windows 7'>VersionNT = 601</Condition>
<Condition Message='Windows 8'>VersionNT = 602</Condition>

Ответ 3

Вы можете использовать свойство MsiNTProductType, чтобы определить, является ли это сервером os. В сочетании с проверкой версии NT вы можете проверить наличие Windows Server 2008R2. Это будет выглядеть следующим образом:

<Condition Message="Windows Server 2008R2 required">
  <![CDATA[(VersionNT = 601 AND MsiNTProductType > 1) OR Installed]]>
</Condition>

Ответ 4

Vista и Server 2008 pre-SP2 имеют тот же самый номер версии. Вам также нужно искать эквивалент Wix для "VER_NT_SERVER" (InstallShield). (на данный момент у нас нет Wix)