Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check for .net framework 4.5.2 in registry in wix

Tags:

wix

How can I check for .net framework 4.5.2 in registry using wix. I've tried this

<Property Id="WIX_IS_NETFRAMEWORK_452_OR_LATER_INSTALLED"/>
<Condition
  Message="This application requires .NET Framework 4.5.2. Please install the .NET Framework then run this installer again.">
  <![CDATA[Installed OR WIX_IS_NETFRAMEWORK_452_OR_LATER_INSTALLED]]>
</Condition

but it is not working. I am using wix v3.10

like image 554
Sony Avatar asked Mar 14 '23 04:03

Sony


1 Answers

Finally after trial and error I managed to solved the issue using

<Condition
  Message="This application requires .NET Framework 4.5.2. Please install the .NET Framework then run this installer again.">
  <![CDATA[Installed OR NETFRAMEWORK45>="#379893"]]>
</Condition>

The condition returns a DWORD which will be prefixed with a # sign and the condition should be

<![CDATA[Installed OR NETFRAMEWORK45>="#379893"]]>

The value 379893 is the Value of the release DWORD. More information can be found from this Microsoft site

EDIT: fixed typo.

like image 138
Sony Avatar answered Mar 31 '23 13:03

Sony