All Users
- Copy
DotNetChecker.dll
to NSIS plugins directory (usuallyC:\Program Files\Nsis\Plugins\
orC:\Program Files (x86)\Nsis\Plugins\x86-ansi
) - Copy DotNetChecker.nsh to NSIS Include directory C:\Program Files (x86)\NSIS\Include
- Add to your installer project
DotNetChecker.nsh
file - Reference
DotNetChecker.nsh
in your main NSI file like this:!include "DotNetChecker.nsh"
- Insert macros with the version of required .NET framework.
Local
- Copy the whole project in to the same folder as your NSIS Script.
- Refrence the Plugin DLL like this:
!addplugindir "NsisDotNetChecker\bin"
- Reference
DotNetChecker.nsh
in your main NSI file like this:!include "NsisDotNetChecker\nsis\DotNetChecker.nsh"
In script
- Added !include DotNetChecker.nsh at the top of the script.
- Added this line into installer section:
- !insertmacro CheckNetFramework 10 - checks for .netframework 1.0
- !insertmacro CheckNetFramework 461 - checks for .netframework 4.61
- !insertmacro CheckNetFramework 472 - checks for .netframework 4.72
- !insertmacro CheckNetFramework 40Client - checks for .netframework 4.0 client
- !insertmacro CheckNetFramework 40Full - checks for .netframework 4.0 Full