Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server Wix:在Win7上检查SQLExpress的一个版本,在Win10上检查另一个版本_Sql Server_Wix - Fatal编程技术网

Sql server Wix:在Win7上检查SQLExpress的一个版本,在Win10上检查另一个版本

Sql server Wix:在Win7上检查SQLExpress的一个版本,在Win10上检查另一个版本,sql-server,wix,Sql Server,Wix,如果在Win7上安装了SQL Express 2014(或更高版本),如果在Win10上安装了SQL Express 2016(或更高版本),我应该通过Wix进行检查。我该怎么做 我现在正在尝试: <!-- SQLExpress --> <Property Id="SQLEXPRSEARCH" Value="0"> <RegistrySearch Id="SqlExprSearch" Key="SOFTWARE\

如果在Win7上安装了SQL Express 2014(或更高版本),如果在Win10上安装了SQL Express 2016(或更高版本),我应该通过Wix进行检查。我该怎么做

我现在正在尝试:

<!-- SQLExpress -->
  <Property Id="SQLEXPRSEARCH" Value="0">
    <RegistrySearch Id="SqlExprSearch" 
                    Key="SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\CurrentVersion" 
                    Name="CurrentVersion" 
                    Root="HKLM" 
                    Type="raw" 
                    Win64="no"/>
  </Property>
  <Condition Message="This application requires Microsoft SQL Server Express 2014 Please install the Microsoft SQL Server then run this installer again.">
    <![CDATA[Installed OR (SQLEXPRSEARCH >= "12.0.2000.8" AND VersionNT >= 601)]]>
  </Condition>

=“12.0.2000.8”和VersionNT>=601)]]>

但它并没有真正涵盖需求。

以下是它对我的作用:

<!-- SQLExpress -->

<Property Id="SQLEXPRVERSION14X86" Value="0">
  <RegistrySearch Id="SqlExprVersion14x86"
                    Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft SQL Server SQLServer2014"
                    Name="Publisher"
                    Root="HKLM"
                    Type="raw"
                  Win64="no"/>
</Property>

 <Condition Message="This application requires Microsoft SQL Server Express 2014. Please install the Microsoft SQL Server then run this installer again.">
  <![CDATA[Installed OR (SQLEXPRVERSION14X86 = "Microsoft Corporation" AND (VersionNT < 602) AND NOT VersionNT64) OR (VersionNT > 602) OR (VersionNT64)]]>
</Condition>

<Property Id="SQLEXPRVERSION14X64" Value="0">
  <RegistrySearch Id="SqlExprVersion14x64"
                  Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft SQL Server SQLServer2014"
                  Name="Publisher"
                  Root="HKLM"
                  Type="raw"
                  Win64="yes"/>
</Property>

<Condition Message="This application requires Microsoft SQL Server Express 2014. Please install the Microsoft SQL Server then run this installer again.">
  <![CDATA[Installed OR (SQLEXPRVERSION14X64 = "Microsoft Corporation" AND (VersionNT < 602) AND VersionNT64) OR (VersionNT > 602) OR NOT (VersionNT64)]]>
</Condition>

<Property Id="SQLEXPRVERSION16X86" Value="0">
  <RegistrySearch Id="SqlExprVersion16x86"
                  Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft SQL Server SQLServer2016"
                  Name="Publisher"
                  Root="HKLM"
                  Type="raw"
                  Win64="no"/>
</Property>

<Condition Message="This application requires Microsoft SQL Server Express 2016. Please install the Microsoft SQL Server then run this installer again.">
  <![CDATA[Installed OR (SQLEXPRVERSION16X86 = "Microsoft Corporation" AND (VersionNT > 602) AND NOT VersionNT64) OR (VersionNT < 602) OR (VersionNT64)]]>
</Condition>

<Property Id="SQLEXPRVERSION16X64" Value="0">
  <RegistrySearch Id="SqlExprVersion16x64"
                  Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft SQL Server SQLServer2016"
                  Name="Publisher"
                  Root="HKLM"
                  Type="raw"
                  Win64="yes"/>
</Property>

<Condition Message="This application requires Microsoft SQL Server Express 2016. Please install the Microsoft SQL Server then run this installer again.">
  <![CDATA[Installed OR (SQLEXPRVERSION16X64 = "Microsoft Corporation" AND (VersionNT > 602) AND VersionNT64) OR (VersionNT < 602) OR NOT (VersionNT64)]]>

602)或(版本NT64)]]>
602)或否(版本NT64)]]>
602)而不是版本NT64)或(版本NT<602)或(版本NT64)]>
602)和VersionNT64)或(VersionNT<602)或(VersionNT64)]>

现在没有时间回答这个问题。但是,即使如此(请阅读该链接-可能检查WindowsBuild属性)。您是否检查过在现有条件的末尾添加基本或分段?一个检查较低的Windows版本和MSSQLS2014,另一个检查Windows10或更高版本和MSSQLS2016(或更高版本)?如果两个条件都失败,您是否中止?很晚了-我可能会有一个金发碧眼的时刻。对于纯粹的机器状态检查-换句话说,你只检查机器状态,不改变系统-尽管自定义操作是可以辩护的。如果您预见到需要对检查的执行方式进行非常细粒度的控制,那么定制操作有时是唯一的选择。取决于需求——它们往往会演变。