1

我的应用程序应该运行

  • 赢 XP Sp3
  • 赢得 Vista Sp2
  • 赢得 7 Sp1
  • 赢 8.1
  • 赢得 10

所以我将 LaunchConditions 添加到我的 MSI。除了在 Win Vista 上一切正常。在 win Vista 上我得到一个错误,它不受支持。你能解释一下我的 LaunchConditions 有什么问题吗?只有 Vista 会导致问题...

<!-- Verify not an Unknown OS -->
    <Condition Message="Das Setup wurde noch nicht auf diesem Betriebssystem getestet und wird aus Sicherheitsgründen beendet. Bitte wenden Sie sich an den Support.">
      <![CDATA[VersionNT=501 OR VersionNT=502 OR VersionNT=600 OR VersionNT=601 OR VersionNT=603]]>
    </Condition>
    <!-- Verify Vista SP2 or above -->
    <Condition Message="$(var.ProdName) benötigt mindestens Windows Vista mit installiertem ServicePack 2.">
      <![CDATA[NOT VersionNT=600 OR (WindowsBuild=6002 AND ServicePackLevel >=2)]]>
    </Condition>
    <!-- Verify XP SP3 or above -->
    <Condition Message="$(var.ProdName) benötigt mindestens Windows XP mit installiertem ServicePack 3.">
      <![CDATA[NOT VersionNT=501 OR (WindowsBuild=2600 AND ServicePackLevel >=3)]]>
    </Condition>
    <!-- Verify Windows Server 2003 SP2 or above -->
    <Condition Message="$(var.ProdName) benötigt mindestens Windows Server 2003 mit installiertem ServicePack 2.">
      <![CDATA[NOT VersionNT=502 OR (WindowsBuild=3790 AND ServicePackLevel >=2)]]>
    </Condition>
    <!-- Verify Windows Server 2008 -->
    <Condition Message="$(var.ProdName) benötigt mindestens Windows Server 2008.">
      <![CDATA[NOT VersionNT=600 OR WindowsBuild=6001]]>
    </Condition>
    <!-- Verify Windows Server 2008 R2 -->
    <Condition Message="$(var.ProdName) benötigt mindestens Windows XP mit installiertem ServicePack 3.">
      <![CDATA[NOT VersionNT=601 OR WindowsBuild > 7100]]>
    </Condition>
    <!--Verify Windows 7 SP1 or above-->
    <!--
    <Condition Message="$(var.ProdName) benötigt mindestens Windows 7 mit installiertem ServicePack 1.">
      <![CDATA[Installed OR ((VersionNT = 601) AND ((WindowsBuild > 7100) AND (ServicePackLevel >= 1)))]]>
    </Condition>-->

    <!--Verify Windows 7 SP1 or above-->
    <Condition Message="$(var.ProdName) benötigt mindestens Windows 7 mit installiertem ServicePack 1.">
      <![CDATA[NOT VersionNT=601 OR (WindowsBuild > 7100 AND ServicePackLevel >= 1)]]>
    </Condition>

    <!-- .Net Framework 4.0 wird benötigt -->
    <PropertyRef Id="NETFRAMEWORK40FULL" />
    <Condition Message="$(var.ProdName) benötigt das .NET Framework 4.0 Full.">
      <![CDATA[Installed OR NETFRAMEWORK40FULL]]>
    </Condition>

    <!-- Kein Downgrade erlauben -->
    <Condition Message='Eine aktuellere Version von "$(var.ProdName)" ist bereits installiert. Das Setup wird nun beendet.'>
      <![CDATA[Installed OR NOT NEWER_VERSION_FOUND]]>
    </Condition>
4

1 回答 1

2

您的启动条件的总体问题是它们是错误的方法。条件必须评估为真才能继续安装。例如,您的 Server 2008 条件需要更改为类似于 VersionNT=600 AND MsiNTProductType>1 的内容,以便 a) 包括服务器检查 b) 如果是 Server 2008 版本,则整个表达式的计算结果为 true。

类似地,Vista 检查应该类似于 VersionNT=600 AND WindowsBuild=6002 AND MsiNTProductType=1 因为 a) build alreasy 包括 SP 级别 b) 产品类型意味着它不是服务器 c) 整个表达式在 a Vista SP2 系统。

于 2015-07-17T17:32:46.080 回答