DotNetVer: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with "= DotNetVer.nsh = LogicLib extensions for checking Microsoft .NET Framework versions and service packs. Homepage: http://ontheperiphery.veraida.com Download from: https://githu...")
 
Line 12: Line 12:
can be replaced with the following values:
can be replaced with the following values:


* 1.0
* 1.0
* 1.1
* 1.1
* 2.0
* 2.0
* 3.0
* 3.0
* 3.5
* 3.5
* 4.0
* 4.0


'''AtLeastDotNetServicePack''' checks if the .NET framework has a service pack version at least as specified.  
'''AtLeastDotNetServicePack''' checks if the .NET framework has a service pack version at least as specified.  
Line 25: Line 25:
'''HasDotNetClientProfile''' checks if the .NET framework is a client profiled install.  
'''HasDotNetClientProfile''' checks if the .NET framework is a client profiled install.  


HasDotNetFullProfile checks if the .NET framework is a full install.
'''HasDotNetFullProfile''' checks if the .NET framework is a full install.


'''AtMostDotNetServicePack''' doesn't do its job correctly, depecrated (dont use)...
'''AtMostDotNetServicePack''' doesn't do its job correctly, depecrated (dont use)...

Revision as of 04:09, 23 December 2010

DotNetVer.nsh

LogicLib extensions for checking Microsoft .NET Framework versions and service packs.

Homepage: http://ontheperiphery.veraida.com Download from: https://github.com/dgrinberg/NSIS_headers/tree/master/DotNetVer

Functions

HasDotNet checks if the specific version of .NET framework is installed.

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.

AtMostDotNetServicePack doesn't do its job correctly, depecrated (dont use)...

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}

Dgrinberg 04:08, 23 December 2010 (UTC)