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
Properties 静默安装上的Installdir_Properties_Wix_Silent - Fatal编程技术网

Properties 静默安装上的Installdir

Properties 静默安装上的Installdir,properties,wix,silent,Properties,Wix,Silent,我遇到了下一个问题,我定义了一个新属性: <Property Id="TEMP_DIR" Secure="yes" > <RegistrySearch Id="TEMP_DIR" Root="HKLM" Key="SOFTWARE\$(Company)" Name="InstallDir" Type="directory"></RegistrySearch> </Property> 然后我定义了一个新组件: <Component I

我遇到了下一个问题,我定义了一个新属性:

<Property Id="TEMP_DIR" Secure="yes" >
    <RegistrySearch Id="TEMP_DIR" Root="HKLM" Key="SOFTWARE\$(Company)" Name="InstallDir" Type="directory"></RegistrySearch>
</Property>
然后我定义了一个新组件:

<Component Id="PerformAction" Guid="E2E4E3E5-FBEC-4051-B47B-9347B78105C2">
   <Condition><![CDATA[TEMP_DIR<>INSTALLDIR]]></Condition>
       …
</Component>
在定期安装时,财产分配正确,条件良好

但在静默安装中,始终安装组件,如果条件为false,则会发生事件

在详细日志上,两个属性似乎都是正确的

评论:

经过进一步调查,根据下一个链接:

我知道INSTALLDIR只有在CostFinalize操作之后才被初始化,并且条件字段在该操作期间启用或禁用,这意味着该属性在该阶段为空


您对如何更早地初始化属性有什么想法吗?

我怀疑INSTALLDIR属性是根据用户在UI序列中的某个位置的输入设置的,而该位置在静默安装中不运行。如果是这种情况,您可能希望将INSTALLDIR的值作为msiexec.exe的参数传递