Menu

#1145 WinVer.nsh incorrect Server check

3.0 Alpha Series
closed-fixed
nobody
None
5
2016-06-18
2016-06-09
Zenju
No

include/winver.nsh:

      IntCmp $0 ${VER_NT_WORKSTATION} _winver_noserver _winver_noserver ""
        IntOp $__WINVERSP $__WINVERSP | ${_WINVER_NTSRVBIT}
      _winver_noserver:

should be:

      IntCmp $0 ${VER_NT_WORKSTATION} _winver_noserver
        IntOp $__WINVERSP $__WINVERSP | ${_WINVER_NTSRVBIT}
      _winver_noserver:

Reason: https://msdn.microsoft.com/en-us/library/ms724833

The check for server OS is "OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION" and not "OSVERSIONINFOEX.wProductType > VER_NT_WORKSTATION"

Discussion

  • Anders

    Anders - 2016-06-10

    Has this produced a bug somehow or are you just nit-picking? The product type values have stayed the same for 20 years. While you are technically correct that MSDN at this point in time recommends that you use != to compare, I believe our current code is unlikely to break but I will try to remember to change it before the next release.

     
  • Anders

    Anders - 2016-06-18
    • status: open --> closed-fixed
     

Log in to post a comment.