A_OSVersion doesnt recognize windows 11 Topic is solved
A_OSVersion doesnt recognize windows 11
windows 11 is recognized as windows 10 in A_OSVersion
Re: A_OSVersion doesnt recognize windows 11
howso? whats it say?
- JoeWinograd
- Posts: 2203
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: A_OSVersion doesnt recognize windows 11 Topic is solved
See this post:aaffe wrote:windows 11 is recognized as windows 10 in A_OSVersion
viewtopic.php?f=76&t=92403&p=409928#p409419
Note this there:
Maybe you were expecting 11.x.xxxxx, but that's not what Microsoft decided to do.The A_OSVersion built-in var shows 10.0.22000.
To be clear, this has nothing to do with AutoHotkey, i.e., the A_OSVersion built-in variable is not "wrong". Try this...open a command prompt on W11...you'll get this (depending on your build, of course):
Regards, JoeMicrosoft Windows [Version 10.0.22000.348]
(c) Microsoft Corporation. All rights reserved.
Re: A_OSVersion doesnt recognize windows 11
Ok, thank you.
Re: A_OSVersion doesnt recognize windows 11
oh, so now microsoft is calling the old OS a brand-new Cadillac Brougham when it isn't even much different! (mind you, the "isn't much different" part is my supposition. I will try to live with win7 till I die I hated 10 so much.) I guess it's a marketing ploy to just make more money.
-
- Posts: 3
- Joined: 22 Sep 2022, 13:39
Re: A_OSVersion doesnt recognize windows 11
This should work!
Code: Select all
; Set the registry key path
RegPath := "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3"
; Read the Settings binary value from the registry
RegRead, SettingsValue, % RegPath, Settings
;MsgBox, SettingsValue %SettingsValue%
; Extract the 9th byte from the binary value
NinthByte := SubStr(SettingsValue, 17, 1)
;MsgBox, NinthByte %NinthByte%
; Check if the 9th byte indicates auto-hide is enabled (03)
if (NinthByte = "0") {
;MsgBox, Win10
winVerson := 10
}
else if (NinthByte = "7")
{
;MsgBox, Win11
winVerson := 11
}
else
{
winVerson := A_OSVersion
}
Who is online
Users browsing this forum: Google [Bot] and 24 guests