开发者

WiX registry search returns C:\ instead of expected path

I'm using the following registry search in WiX

  <Property Id="VISUALSTUDIODIR">
      <RegistrySearch Id="VISUALSTUDIODIRCMD" Type="raw" Root="HKLM" 
      Key="Software\Microsoft\VisualStudio\1开发者_如何学JAVA0.0" Name="InstallDir" Win64="yes" />
  </Property>

Unfortunately, the path resolves to C:\ instead of the required path. Can someone help me understand why? (The registry path exists - I checked.)


What happens if you remove the Win64 attribute? I have been using the following without any problems:

<Property Id="VSINSTALLDIR" Secure="yes">
  <RegistrySearch Id="VSInstallRegistry" Root="HKLM" Key="Software\Microsoft\VisualStudio\10.0" Name="InstallDir"  Type="directory" />
</Property>


I'm not sure why the registry search doesn't work in your case. But have you tried referencing the standard VS properties provided by WiX instead?

Starting from WiX v3.5 VSExtension offers a number of properties containing various info about VS 2010. For instance, VS2010_ROOT_FOLDER contains full path to the Visual Studio 2010 root installation directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜