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
如何在wix安装程序中获取64位的SQLDataRoot注册表设置_Wix - Fatal编程技术网

如何在wix安装程序中获取64位的SQLDataRoot注册表设置

如何在wix安装程序中获取64位的SQLDataRoot注册表设置,wix,Wix,在我的wix安装程序中,我有这些属性来获取sql数据路径 <Property Id="SQLSERVERINSTANCENAME" > <RegistrySearch Id="SqlServerInstanceName" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" Name="MSSQLSERVER" Type="raw"/> </Property>

在我的wix安装程序中,我有这些属性来获取sql数据路径

<Property Id="SQLSERVERINSTANCENAME" >
  <RegistrySearch Id="SqlServerInstanceName" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" Name="MSSQLSERVER" Type="raw"/>
</Property>

<Property Id="SQLSERVERDATAPATH" >
  <RegistrySearch Id="SqlServerDataPath" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\[SQLSERVERINSTANCENAME]\Setup" Name="SQLDataRoot" Type="raw"/>
</Property>

但是它在64位Windows 2008 Server R2上不起作用

尝试添加
Win64=“yes”
,这将告诉
注册表搜索
查看注册表的64位。应已添加此选项,如果需要搜索64位部分,则告诉搜索仅查找64位部分,然后使用
Win64=“$(var.Platform)”
并指定如下平台:

<!-- Define platform-specific names and locations -->
<?if $(var.Platform) = x64 ?>
<?define ProductName = "$(var.ProductName)" ?>
<?define Win64 = "yes" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define PlatformCommonFilesFolder = "CommonFiles64Folder" ?>
<?define UpgradeCode = "98CECA6F-D312-466E-B04F-088ECD9CFCA2" ?>
<?else ?>
<?define ProductName = "$(var.ProductName) (x86)" ?>
<?define Win64 = "no" ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define PlatformCommonFilesFolder = "CommonFilesFolder" ?>
<?define UpgradeCode = "6B968607-8D3E-45AF-A590-253E54EE4617" ?>
<?endif ?>


谢谢,这很有用。关于注册表问题,我添加了Win64=yes属性,但该值为空。之前我设置了Execute=“deferred”,我删除了它,它就可以工作了。