Reputation: 65
I have already read through Windows wiki page - https://nsis.sourceforge.io/Get_Windows_version and I understand that GetWindowsVersion plugin is limited only until Windows 8.1. How can I ensure to check windows version for Windows 10 and Windows server 2019?
PS: I have already referred - NSIS Detect Windows Version and I see that this thread is a little outdated.
Upvotes: 2
Views: 1372
Reputation: 101764
Use WinVer.nsh
!include WinVer.nsh
Function .onInit
${IfNot} ${AtLeastWin10}
MessageBox mb_iconStop "Windows 10 blah blah"
Abort
${EndIf}
FunctionEnd
Asking for plain Windows 10 but a specific server version is rather strange but if you must:
${If} ${IsServerOS}
${AndIf} ${AtLeastWaaS} 1809
...
${EndIf}
Upvotes: 4