Announcement

Collapse
No announcement yet.

Windows 11 detection

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Windows 11 detection

    Hi
    is there a way to detect windows 11?

    WinVer.nsh and https://nsis.sourceforge.io/Get_Windows_version not updated for it

    thanks

  • #2
    Why do you care? It is better to test for features rather than the version.

    If there is no other way; ${If} ${AtLeastBuild} 22000
    IntOp $PostCount $PostCount + 1

    Comment


    • #3
      I have a software that has a specific behavior in w11 and I have to create a 'patch' for it

      I'll test soon this code also:
      PHP Code:
      ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "ProductName"

       
      ${StrStrAdv$R1 "$R0" "indows 11" ">" "<" "0" "0" "0"

      ${IfNot$R1 == ''
      ...
      ${Endif} 
      thanks

      Comment


      • #4
        While you wait for the next release:

        PHP Code:
        !include WinVer.nsh
        !define /IfNDef AtLeastWin11 'U>= WinVer_BuildNumCheck 22000'
        !define /IfNDef AtMostWin11  'U<= WinVer_BuildNumCheck 22000' 
        IntOp $PostCount $PostCount + 1

        Comment


        • #5
          good,thanks

          Comment

          Working...
          X
          😀
          🥰
          🤢
          😎
          😡
          👍
          👎