我可以使用util:RegistrySearch从注册表项中检索路径,并在util:FileSearch中使用该路径来检查该目录中的文件是否存在?
示例
我有一个存储在注册表项中的可执行文件的路径。
HKLM\Software\MyApp\ -> C:\Program Files (x86)\MyApp\MyApplication.exe
如果此目录中存在不同的文件(例如:C:\ Program Files(x86)\ MyApp \ AnotherFile.dll),我想用作检测条件。
<util:RegistrySearch Id="SearchForMyApp"
Variable="MyApp_Found"
Root="HKLM"
Key="SOFTWARE\MyApp"
Result="exists"
Win64="no"
After="SearchForOtherFile"
/>
<util:FileSearch Id="SearchForOtherFile"
Variable="OtherFile_Found"
Result="exists"
Path="AnotherFile.dll" Comment="<-- how to use path from reg search here"
/>
答案 0 :(得分:1)
是的,你可以。
使用&#34;&#34;属性为了定义应该追求的属性。 http://wixtoolset.org/documentation/manual/v3/xsd/util/registrysearch.html