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_Registry_Relative Path - Fatal编程技术网

如何相对于安装路径设置WiX注册表值

如何相对于安装路径设置WiX注册表值,wix,registry,relative-path,Wix,Registry,Relative Path,这就给我留下了\Default.udl <RegistryKey Key="Software\My Company\Product\Connections" Root="HKCU"> <RegistryValue Name="Default" Value="[INSTALLLOCATION]\Default.udl" Type="string" /> </RegistryKey> 我想要像C:\Program Files\Company\Produc

这就给我留下了\Default.udl

<RegistryKey Key="Software\My Company\Product\Connections" Root="HKCU">
  <RegistryValue Name="Default" Value="[INSTALLLOCATION]\Default.udl" Type="string" />
</RegistryKey>


我想要像C:\Program Files\Company\Product\Default.udl这样的东西,而不是INSTALLLOCATION使用。我可以想到一些可能导致问题的因素

<RegistryKey Key="Software\My Company\Product\Connections" Root="HKCU">
  <RegistryValue Name="Default" Value="[INSTALLLOCATION]\Default.udl" Type="string" />
</RegistryKey>
你确定你的目录布局正确吗?它应该是这样的:

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
    <Directory Id="CompanyFolder" Name="My Company">
      <Directory Id="INSTALLLOCATION" Name="Product">
      </Directory>
    </Directory>
  </Directory>
</Directory>

这将其设置为C:\\Default.udl您是否使用INSTALLLOCATION作为目录Id(而不是,例如,INSTALLDIR或APPLICATIONFOLDER)?在我写问题时,我没有使用任何,现在我使用的是Application Folder。奇怪的是,我可以使用just Install location成功地创建一个具有正确路径的密钥,但不能使用afterwardsGreat附加的文件名。实际上,我使用了APPLICATIONFOLDER,但有机会时我会切换到[#FILE]符号。你的答案很清楚,包括了有关安装环境的相关奖励信息,这可能让我上周大开眼界!