Skip to content
⌘ NSIS Forum Archive

how to check if DotNet Framework 3.0 SP 1 or a higher version is installed

3 posts

Bardy#

how to check if DotNet Framework 3.0 SP 1 or a higher version is installed

Hi everyone,

Sorry to bothering you. There is a problem I could not solved.

There is an installer I wanna make. One of requirements is "check if DotNet Framework 3.0 SP 1 or a higher version is installed". DotNet Framework 3.0 could be checked with registry. But I have no idea how to check the higher version. I just imaged a foolish way as followed:

Search DotNet Framework 3.0 in registry.
Search DotNet Framework 3.5 in registry.
Search DotNet Framework 4.0 (if exists) in registry.
Search DotNet Framework 4.5 (if exists) in registry.
...
Search the newest version DotNet Framework in registry.


Whether there is a way that could compare the version automaticly not do the foolish way like I made? Could you please give me any good solutions for this requirement? Many thanks.

Have a nice day
Bardy
Animaether#
nothing wrong with the registry method - if nothing else it will tell you if it was installed properly.

Anyway - have you tried a search for 'dotnet' in the forums / google?

Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.

Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.






Plenty of resources.. up to you which method you use (getCoreversion vs registry), but keep in mind each method's limitations. Several of the above links for example point to a method that will only detect the 'currently installed' version - which will do you no good if it says .NET Framework 3 is installed, but your dependent application needs a Framework 1 API call.