Check registry keys of a Software that is already installed in your system For WIX setup

StackOverflow https://stackoverflow.com/questions/21848395

  •  13-10-2022
  •  | 
  •  

Question

I have a WIX setup. I want to promt message box for some prerequisites before installing my setup. I am using below code to check registry keys for a particular software. But it always prompt a message weather a software is installed or not.

<Condition Message="This application requires ReportViewer.">
      <![CDATA[ReportViewerV10 OR ReportViewerWow64V10]]>
    </Condition>

    <util:RegistrySearch
     Root="HKLM"
     Key="SOFTWARE\Microsoft\ReportViewer\v10.0"
     Value="Install"
     Variable="ReportViewerV10"
     Win64="yes"
  />
    <util:RegistrySearch
    Root="HKLM"
    Key="SOFTWARE\Wow6432Node\Microsoft\ReportViewer\v10.0"
    Value="Install"
    Variable="ReportViewerWow64V10"
    Win64="yes"/>

Can anyone guide me where i am doing wrong? What should be registry keys for a software?

Était-ce utile?

La solution

According to this documentation you don't have your Registry search parameters set up quite right. The following should yield better results.

<Property Id="NReportViewerV10">
    <RegistrySearch Id="NetFramework20"
                Root="HKLM"
                Key="SOFTWARE\Microsoft\ReportViewer\v10.0"
                Name="Install"
                Type="raw" />
</Property>
<Property Id="ReportViewerWow64V10">
    <RegistrySearch Id="NetFramework20"
                Root="HKLM"
                Key="SOFTWARE\Wow6432Node\Microsoft\ReportViewer\v10.0"
                Name="Install"
                Type="raw" />
</Property>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top