如何在wix安装程序中获取64位的SQLDataRoot注册表设置
在我的wix安装程序中,我有这些属性来获取sql数据路径如何在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>
<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”,我删除了它,它就可以工作了。