|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Aug 2009
Posts: 8
|
DotNetVer.nsh - another way of checking MS.Net version
Hi all,
I know that there are a couple of methods in the wiki for determining the existence and version of Microsoft.Net, but not one of them covered everything I needed and I found them a little messy. I have created a header file, for purely determining the existence and version of dotNet. I liked the cleanliness of the WinVer header, and decided to base DotNetVer off that. Thanks to a little help from the community, it checks for DotNet 1.0 to 4.0, their service packs and types of installation. Thus DotNetVer.nsh is a LogicLib extension for checking Microsoft .NET Framework versions and service packs. "HasDotNet<version>" checks if the specific version of .NET framework is installed. <version> can be replaced with the following values: 1.0 1.1 2.0 3.0 3.5 4.0 "AtLeastDotNetServicePack" checks if the .NET framework has a service pack version at least as specified. "IsDotNetServicePack" checks if the .NET framework has a service pack version exactly as specified. "HasDotNetClientProfile" checks if the .NET framework is a client profiled install. "HasDotNetFullProfile" checks if the .NET framework is a full install. Usage examples: ${If} ${HasDotNet4.0} DetailPrint "Microsoft .NET Framework 4.0 installed." ${If} ${DOTNETVER_4_0} AtLeastDotNetServicePack 1 DetailPrint "Microsoft .NET Framework 4.0 is at least SP1." ${Else} DetailPrint "Microsoft .NET Framework 4.0 SP1 not installed." ${EndIf} ${If} ${DOTNETVER_4_0} HasDotNetClientProfile 1 DetailPrint "Microsoft .NET Framework 4.0 (Client Profile) available." ${EndIf} ${If} ${DOTNETVER_4_0} HasDotNetFullProfile 1 DetailPrint "Microsoft .NET Framework 4.0 (Full Profile) available." ${EndIf} ${If} ${DOTNETVER_4_0} HasDotNetFullProfile 0 DetailPrint "Microsoft .NET Framework 4.0 (Full Profile) not available." ${EndIf} ${EndIf} Code: Download from GITHUB https://github.com/dgrinberg/NSIS_headers Hompage: http://ontheperiphery.veraida.com/ Please feel free to use and modify as you see fit. If you find any issues, let me know and I will have a look - alternatively you can fork it on GITHUB and then push any changes back to me. Thanks all David Grinberg |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Nice work. It would be helpful if you could upload to the NSIS Wiki.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#3 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,839
|
Thanks for the work, I'm sure lots of people will be helped by this. I didn't look in detail at your macro, but I'd suggest to use the same format for the ${Has} defines and the more elaborate ${VER} defines. So if you have ${HasDotNet4.0}, it may be better if you'd use ${DotNetVer4.0} instead of ${DOTNETVER_4_0}.
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jan 2011
Location: LENS - FRANCE
Posts: 23
|
nice job !
If framework (4) was not install Have you the code to download it and install it ? thanks |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|