小编Zer*_*ren的帖子

根据条件在WiX中设置属性

应该很容易,但几个小时后我就空白了.(

我做了一个注册表搜索(实际上是两个),因为我需要检查前两个安装中的任何一个,然后将我的新文件安装到找到的先前安装的位置.

  • 这些先前安装中只有一个实际存在.

然后我需要将我的新文件安装到找到'PROD#'的'InstallLocation'.

<!—  Look for the UnInstall key of the 1st possible product  -->
<!—  GUID = {E928E024-DEFE-41A7-8469-D338212C4943}           -->
<Property Id='PROD1'>
    <RegistrySearch Id='PROD_REG1'
                    Type='raw'
                    Root='HKLM'
                    Key='$(var.REGKEY_PROD1)'
                    Name='InstallLocation' />
</Property>

<!—  Look for the UnInstall key of the 2nd possible product  -->
<!—  GUID = {A40A9018-DB9D-4588-A591-F012600C6300}           -->
<Property Id='PROD2'>
  <RegistrySearch Id='PROD_REG2'
                  Type='raw'
                  Root='HKLM'
                  Key='$(var.REGKEY_PROD2)'
                  Name='InstallLocation' />
    </Property>

<!--  How do I set INSTALL_HERE Property to whichever ‘InstallLocation’ was found?  -->

<!--  Define the …
Run Code Online (Sandbox Code Playgroud)

conditional wix properties

14
推荐指数
1
解决办法
2万
查看次数

标签 统计

conditional ×1

properties ×1

wix ×1