我想在Windows注册表中保存与wix一起安装的应用程序的路径。我尝试了以下方法:
<RegistryValue Root="HKLM" Key="Software\company\InstallLocation" Value="[#INSTALLLOCATION]" Type="string" Action="write" />
其中INSTALLLOCATION
是Wix中文件夹的目录ID,但这不起作用。似乎[#id]语法仅适用于文件...
我看到了以下问题,但他所引用的博客似乎已不复存在了:
https://stackoverflow.com/questions/521825/saving-install-path-to-registry
答案 0 :(得分:38)
只需删除#
符号,只保留[INSTALLLOCATION]
即可。 #
符号表示文件密钥。如果没有#
,它就会引用一个属性all directories become properties。有关详细信息,请参阅the article about Formatted data type。