Jump to content

Search the Community

Showing results for tags 'iswindows_11()'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. 🙃 ConsoleWrite("- Is Windows 11: " & _IsWindows_11() & @CRLF) ;ConsoleWrite("- Is Windows Server 2022: " &_IsWindows_22() & @CRLF) Func _IsWindows_11() If StringInStr(@OSVersion, "11") Or StringInStr(_GetOS_Name(), "11") Then Return 1 Return 0 EndFunc ;==>_IsWindows_11 Func _IsWindows_22() If StringInStr(@OSVersion, "22") Or StringInStr(_GetOS_Name(), "22") Then Return 1 Return 0 EndFunc ;==>_IsWindows_22 Func _GetOS_Name() Local $OSname, $objItem = "", $strComputer = ".", $wbemFlagReturnImmediately = 0x10, $wbemFlagForwardOnly = 0x20 Local $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\") Local $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then For $objItem In $colItems $OSname = $objItem.Caption ConsoleWrite("> System: " & $OSname & @CRLF) Return $OSname Next Else ConsoleWrite("! No WMI Objects Found for class: Win32_OperatingSystem" & @CRLF) Return SetError(1, 0, "") EndIf EndFunc ;==>_GetOS_Name ; DAO VAN TRONG - TRONG.LIVE
×
×
  • Create New...