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-在属性中使用属性_Wix_Windows Installer - Fatal编程技术网

WiX-在属性中使用属性

WiX-在属性中使用属性,wix,windows-installer,Wix,Windows Installer,我有一个WIX3.10安装程序,为现有应用程序安装一个附加模块。出于这个原因,我使用RegistrySearch来获取应该放置加载项的安装文件夹。之后,必须使用一些参数执行同一目录中已经存在的(这意味着这是基本应用程序的一部分,而不是加载项)实用程序 我试过这个: 很遗憾,[INSTALLFOLDER]未解析。很明显,我也得到了一个编译器的警告 如何解析该属性?您的警告说明了要执行的操作: Warning The 'X1' Property contains '[X2]' in it

我有一个WIX3.10安装程序,为现有应用程序安装一个附加模块。出于这个原因,我使用RegistrySearch来获取应该放置加载项的安装文件夹。之后,必须使用一些参数执行同一目录中已经存在的(这意味着这是基本应用程序的一部分,而不是加载项)实用程序

我试过这个:


很遗憾,
[INSTALLFOLDER]
未解析。很明显,我也得到了一个编译器的警告


如何解析该属性?

您的警告说明了要执行的操作:

Warning     The 'X1' Property contains '[X2]' in its value which is an illegal reference to another property.  If this value is a string literal, not a property reference, please ignore this warning.  To set a property with the value of another property, use a CustomAction with Property and Value attributes.
注意:使用带有属性和值属性的CustomAction。

因此,您需要定义没有值的属性

<Property Id="WixQuietExecCmdLine" Value=" " />

并使用自定义操作填充它

<CustomAction Id="SetProp" Property="WixQuietExecCmdLine" Value="RegAddOn.exe /f [INSTALLFOLDER]\Addon.RegFile"></CustomAction>

并在当前自定义操作之前运行它

<InstallExecuteSequence>
  <Custom Action="SetProp" OnExit="success"/>
  <Custom Action="QtExec" After="SetProp"/>
</InstallExecuteSequence>

还可以在“延期”执行下查看此文档: