相关疑难解决方法(0)

根据条件在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万
查看次数

仅在满足特定条件时才设置Wix属性

我想做的是:

<Property Id="LICENSEKEYPATH">
      REMOVE~="ALL" AND NOT UPGRADINGPRODUCTCODE
      <DirectorySearch Id="ProgramDataSearch" AssignToProperty="yes" Depth="4" Path="[#ProductDirInAppData]">
        <FileSearch Id="LicenseFileSearch" Name="lic-conf.enp"/>
      </DirectorySearch>
</Property>
Run Code Online (Sandbox Code Playgroud)

当我的应用程序被卸载时,只有这样,我是否要搜索许可证文件并获取其路径.目前,虽然代码没有给出任何错误,但即使我正在安装文件,它仍然会搜索许可证文件路径.因此,设置会延迟很长时间.更重要的是,wix设置在第一个屏幕中显示其搜索此属性的效果,然后继续其他屏幕.

那么,如何仅在卸载期间搜索文件或设置属性的值?

installation wix wix3

5
推荐指数
1
解决办法
4976
查看次数

标签 统计

wix ×2

conditional ×1

installation ×1

properties ×1

wix3 ×1