Sumit Sawant
Sumit Sawant

Reputation: 21

How can I detect whether .NET Framework 3.5 or higher is installed in WiX?

I currently using the following markup in my WiX installer project to check if .NET Framework 3.5 or greater is installed.

Upvotes: 0

Views: 385

Answers (2)

scaler
scaler

Reputation: 574

there is no Release Reg_DWORD for .Net Framework 3.5 But you can detect it using the following RegistrySearch:

<Property Id="NET35INSTALLED" Secure="yes" Admin="yes"/>
<util:RegistrySearch
  Id="Net35Installed"
  Variable="NET35INSTALLED"
  Root="HKLM"
  Key="Software\Microsoft\NET Framework Setup\NDP\v3.5"
  Value="Install"
  Win64="no"
  Format="compatible"
/>

To use it in a condition use NET35INSTALLED = 1.

See more information in the official documentation.

Upvotes: 0

Harm van der Haas
Harm van der Haas

Reputation: 384

Visit : https://www.mking.net/blog/detecting-dotnet-framework-versions-with-wix

there you see the check for 4.7.2 installed :

<PropertyRef Id='WIXNETFX4RELEASEINSTALLED'/>
<Condition Message='This setup requires the .NET Framework 4.7.2 (or greater) to be installed.'>
        <![CDATA[Installed OR (WIXNETFX4RELEASEINSTALLED >= "#461808")]]>
</Condition>

You only need to replace the release key with the 3.5 version..

Upvotes: -1

Related Questions