Windows 11 Support
› Forums › Desktop Info › Windows 11 Support
Tagged: OSBUILD, Windows 11
- This topic has 32 replies, 6 voices, and was last updated 3 weeks ago by
rtruss.
-
AuthorPosts
-
-
1 October, 2021 at 1:18 am #4542
I’m playing with the Windows Insider build for Windows 11 and everything seems to work pretty well with the exception of the OSBUILD variables. The Major Version (%2) variable is still showing “10” for Windows 11. I think this due to the CurrentVersion number in the registry (HKLM\SOFTWARE\Microsoft\Windows NT) still being “6.3”.
12345WMI=interval:0,color:ffdd99,set:WindowsVersion,namespace:root\cimv2,query:Win32_OperatingSystem,display:%caption% (%OSArchitecture%),hidden:1REG=interval:0,set:DisplayVersion,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DisplayVersion,display:%1,hidden:1IF=value1:%DisplayVersion%,value2:,comparator:eqREG=interval:0,set:DisplayVersion,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseId,display:%1,hidden:1OSBUILD=interval:0,color:ffdd99,text:Operating System,display:%WindowsVersion% |%2.%3.%4 (%DisplayVersion%)Attachments:
-
1 October, 2021 at 9:08 am #4547
OSBUILD uses the GetVersionEx api call. I just looked this up and it says the following:
With the release of Windows 8.1, the behavior of the GetVersionEx API has changed in the value it will return for the operating system version. The value returned by the GetVersionEx function now depends on how the application is manifested.
Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2). Once an application is manifested for a given operating system version, GetVersionEx will always return the version that the application is manifested for in future releases.
It appears to be answering the question of “What is the OS version?” with “What would you like it to be?”
So maybe it’s time to find something a little more deterministic
-
1 October, 2021 at 10:59 pm #4552
Maybe you should go back to the actual version number for that function (6.3 in this case)?
Side Note: I do find it funny that looking at registry keys, Windows 11 looks to be Windows 10 21H2, with an entirely new skin as part of the feature release. I mean, look at some of the info in the “CurrentVersion” key.
Attachments:
-
-
16 October, 2021 at 10:33 am #4594
Hi Nathan,
You think it’s funny that it still looks like Windows 10 — look at the
ReleaseId
key — the second half of 2020, despite yourDisplayId
showing 21H2! 🙂Anyways, here’s my solution to get all the build info so far. It’s a bit verbose, but works on all the machines I’m using it on!
123456789101112131415161718192021222324252627282930# windows configurationWMI=hidden:1,interval:0,namespace:root\cimv2,query:Win32_OperatingSystem,set:OSSku,display:%caption%WMI=hidden:1,interval:0,namespace:root\cimv2,query:Win32_OperatingSystem,set:OSArch,display:%OSArchitecture%WMI=hidden:1,interval:0,namespace:root\cimv2,query:Win32_OperatingSystem,set:OSVersion,display:%Version%WMI=hidden:1,interval:0,namespace:root\cimv2,query:Win32_OperatingSystem,set:OSInstallDate,display:%InstallDate_month%[mmm] %InstallDate_day% %Installdate_year% %Installdate_hour%[1.0a]:%Installdate_minute%[2.0d] %Installdate_hour%[2.0p]REG=hidden:1,interval:0,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DisplayVersion,set:ReleaseIDREG=hidden:1,interval:0,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UBR,set:UBRIF=value1:%ReleaseID%,value2:,comp:eqREG=hidden:1,interval:0,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseId,set:ReleaseIDIF=value1:%UBR%,value2:,comp:neSET=key:UBR,value:.%UBR%OSBUILD=hidden:1,interval:0,set:OSBuild,display:Version %ReleaseID% Build %OSVersion%%UBR%# later in the file...# asset informationCOMMENT=text:COMMENT=text:%FullUser%,color:%Header%COLOR=%Highlight%COMMENT=text:%Manufacturer% %Model%COMMENT=text:%OSSku% %OSArch%COMMENT=text:%OSBuild%COMMENT=text:Installed: %OSInstallDate%COMMENT=text:BIOS revision: %SMBIOSBIOSVersion%COLOR=%Default%It grabs most things it can from WMI, the OS display name, arch, version (this is the main one, will be the 10.0.xxxxx), install date.
Then it gets the release ID from the registry. (This is the ‘feature set’ that will be the 1903/20H1/21H1, etc.) It gets it from the keyDisplayVersion
. However that key wasn’t the one that windows used to use, having moved from theReleaseId
key. So later it will check to see if the value it got fromDisplayVersion
is empty, and if so, get the value fromReleaseId
Lastly, it gets theUBR
key. TheUBR
is the.xxx
that gets added on to the version shown inwinver
and the sort. That’s another key that wasn’t always there (can’t quite remember when it was added), so if it’s empty I let it stay empty. Otherwise the lastIF
sets it to it’s value with the preceding.
, so it looks nice tacked onto the osbuild printout.I’ve attached a screenshot of what the output looks like.
Attachments:
-
16 October, 2021 at 10:59 am #4599
Oh, I’m well aware of the fact that it’s Windows 10 with a facelift. Best thing in 11 I’ve found so far is that they got rid of Internet Explorer. The interface seems snappy, and since I run an Intel processor and not a Ryzen I’m not affected by the nasty L3 cache bug.
-
19 October, 2021 at 10:41 am #4604
That might be the kind of thing I end up doing under the hood.
As of now VirtualBox won’t load Win11 so I can’t even test it.
-
This reply was modified 2 years ago by
Glenn.
-
19 October, 2021 at 11:38 am #4607
Why won’t it load? TPM and Secure Boot? If so, just rename the “\sources\appraiserres.dll” file in the install media with a trailing “_bak” and re-run the setup. Bypasses all the checks.
-
This reply was modified 2 years ago by
Nathan_K.
-
19 October, 2021 at 1:53 pm #4610
It doesn’t support TPM apparently. I tried your suggestion of renaming the dll but it still says the machine doesn’t meet the spec requirements.
-
19 October, 2021 at 2:03 pm #4611
When I renamed the file to “appraiserres.dll_bak” it worked fine to disable the checks. I even installed it on an older 3rd Gen Intel Core-i5 with a TPM 1.2 without issue. You do have to make sure that you completely close and re-launch the installer. I ran it from a USB drive.
-
-
This reply was modified 2 years ago by
-
This reply was modified 2 years ago by
-
21 October, 2021 at 10:26 am #4627
Just as an FYI:
those four WMI queries which are all the same except retrieving a different property can be handled by a single query:
12345WMI=namespace:root\cimv2,query:Win32_OperatingSystem,\set:OSSku=%caption% OSArch=%OSArchitecture% OSVersion=%Version% OSInstallDate,\display:%InstallDate_month%[mmm] %InstallDate_day% %Installdate_year% %Installdate_hour%[1.0a]:%Installdate_minute%[2.0d] %Installdate_hour%[2.0p]TEXT=text:Operating System,display:%OSSku%|%OSArch% %OSVersion%|Installed: %OSInstallDate%-
21 October, 2021 at 9:40 pm #4629
Can something similar to this be done with REG keys too? Something like the example below:
REG=interval:0,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion,set:MajorVersion=%CurrentVersion% CurrentBuild=%CurrentBuild% MinorBuild=%UBR% DisplayVersion=%DisplayVersion%,hidden:1
-
-
19 October, 2021 at 11:58 am #4609
Here is the custom Operating System and Build# section I’m using. Feel free to use what you want.
12345678WMI=interval:0,color:ffdd99,set:WindowsVersion,namespace:root\cimv2,query:Win32_OperatingSystem,display:%caption% (%OSArchitecture%),hidden:1REG=interval:0,set:MajorVersion,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion,display:%1,hidden:1REG=interval:0,set:CurrentBuild,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentBuild,display:%1,hidden:1REG=interval:0,set:MinorBuild,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UBR,display:%1,hidden:1REG=interval:0,set:DisplayVersion,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DisplayVersion,display:%1,hidden:1IF=value1:%DisplayVersion%,value2:,comparator:eqREG=interval:0,set:DisplayVersion,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseId,display:%1,hidden:1TEXT=interval:0,color:ffdd99,text:Operating System,display:%WindowsVersion% |%MajorVersion%.%CurrentBuild%.%MinorBuild% (%DisplayVersion%) -
21 October, 2021 at 12:10 pm #4628
Ok, I’ve added a new item called OSBUILD2 which basically encompasses all of this.
-
23 October, 2021 at 12:03 am #4642
Got it and loving it so far. One question is there a way to remove the Microsoft from the OSDBUILD2 %1 variable? We know its microsoft already so.. Just trying to keep it more concise to fit in smaller widnows
OSBUILD2=display:%1 %18 (%17)
Displays; Microsoft Windows 11 Enterprise 21H2 (22000)looking for; Windows 11 Enterprise 21H2 (22000)
at least without doing other types of wmi calls like like i am now:
# OS info lookup table
REG=value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentBuild, set:currentbuild, hidden:1
REG=value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName, set:productname, hidden:1
REG=value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseId, set:releaseid, hidden:1
#This line item only applies to WIN10 Workstations
REG=value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DisplayVersion, set:displayversion, hidden:1WMI=Text:Operating System,namespace:root\cimv2,query:Win32_OperatingSystem,display:%ProductName% %DisplayVersion% (%CurrentBuild%)
I also attached an example of what I used to get and what the OSBUILD2 shows
Attachments:
-
23 October, 2021 at 7:30 am #4654
I’ll add the ProductName field from the registry so you can choose which one to use.
-
23 October, 2021 at 12:53 am #4644
I’m good with the new functionality.
This:
12345678WMI=interval:0,color:ffdd99,set:WindowsVersion,namespace:root\cimv2,query:Win32_OperatingSystem,display:%caption% (%OSArchitecture%),hidden:1REG=interval:0,set:MajorVersion,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion,display:%1,hidden:1REG=interval:0,set:CurrentBuild,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentBuild,display:%1,hidden:1REG=interval:0,set:MinorBuild,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UBR,display:%1,hidden:1REG=interval:0,set:DisplayVersion,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DisplayVersion,display:%1,hidden:1IF=value1:%DisplayVersion%,value2:,comparator:eqREG=interval:0,set:DisplayVersion,value:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseId,display:%1,hidden:1TEXT=interval:0,color:ffdd99,text:Operating System,display:%WindowsVersion% |%MajorVersion%.%CurrentBuild%.%MinorBuild% (%DisplayVersion%)Verses this:
OSBUILD2=interval:0,color:ffdd99,text:Operating System,display:%1 (%2)|%15.%17.%16 (%18)
I’d call that a vast improvement. Thanks Glenn!
-
This reply was modified 2 years ago by
Nathan_K.
-
This reply was modified 2 years ago by
-
23 October, 2021 at 3:53 am #4647
So tell me is any of you are seeing this. On initial load I get the first pic and then after it refreshes/reloads I get what I think should be correct. It also happens with previous versions and have not yet confirmed the behavior on other hardware, right now Surface book 3 is what I am on.
-
This reply was modified 2 years ago by
rtruss. Reason: forgot to rename the ini file
-
23 October, 2021 at 4:33 am #4652
I can honestly say I’ve never seen mine do that, but I’ve never tried it on a SurfaceBook either. It may have to do with the screen scaling. I always keep my systems at 100%, so I’m not a good test for that.
-
23 October, 2021 at 7:38 am #4655
I don’t have access to a Surface Pro so I don’t have any way of addressing that. Windows scaling is an absolute nightmare and I’m regretting ever going down that rabbit hole.
-
25 October, 2021 at 3:49 pm #4662
I might have accidentally found that bug. Fingers crossed!!
-
This reply was modified 2 years ago by
-
27 October, 2021 at 9:03 am #4667
Finally got Win 11 installed on VirtualBox 6.1.28 using the following:
https://forums.virtualbox.org/viewtopic.php?f=6&t=104042&p=507881&hilit=windows+11#p507881
Basically, there is a registry snippet on the Guest Additions iso that bypasses the machine check.
-
This reply was modified 2 years ago by
Glenn.
Attachments:
-
This reply was modified 2 years ago by
-
18 June, 2022 at 3:08 am #5375
display:%1 vs display:%21
Windows 11 reports the respective variable like this
with %1
Microsoft Windows 11 Enterprisewith %21 aka:%productname% we get
Windows 10 EnterpriseI didn’t notice this right away 🙁 and now need to go back to multiple lines to remove Microsoft from the disaply as I’m trying to keep it short so it does not eat real estate on the screen. This I of course blam Microsoft for leaving dirty code in place but still sad. 🙁
-
2 March, 2023 at 5:32 am #5790
I just came across the same issue with Windows 11.
OSBUILD2 %1 shows up correctly but %21 shows as Windows 10 (for whatever reason the registry still shows 10)
I also wanted to remove Microsoft from the beginning of the OS name and was able to get around it by using REGEX to remove Microsoft. Hopefully this will help someone in the future. If there is a better way to accomplish this, I’d be happy to see it.
12OSBUILD2=set:winosname=%1 winosversion=%18,regex:(Microsoft ),hidden:1TEXT=text:OS,display:%winosname% - %winosversion%-
This reply was modified 9 months ago by
SergeantPanda.
-
14 November, 2023 at 5:15 am #6191
Windows 11 is really just an enhanced version of Windows 10, which is why the registry still shows 10. I used the OSBUILD2 line below for what I wanted to see.
OSBUILD2=interval:0,color:ffdd99,text:Operating System,display:%1 (%2)|%15{{{.%17}}}{{{.%16}}} {{{(%18)}}}
-
14 November, 2023 at 5:22 am #6192
%1 aka %operating_system% is working fine and showing Windows 11, but it starts with “Microsoft”
I would prefer to use %21 aka %productname% which removes “Microsoft”, but the result for that one is Windows 10.
%operating_system% = Microsoft Windows 11 Enterprise
%productname% = Windows 10 Enterprise-
14 November, 2023 at 5:33 am #6193
Still the way it is. If you see my post here: https://www.glenn.delahoy.com/forums/topic/windows-11-support/#post-4642 this is how I work through it. We have even updated it since I posted as we now have windows 10/11/ multi user to contend with.
Here is our updated code for identifying what os it is:
# needed to account for Windows 11 as there are some items that still report win 10 like productname
REG=set:OSBuild,value:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentBuild,display:%1,hidden:1
REG=set:OSEdition,value:HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\EditionID,display:%1,hidden:1
IF=value1:%OSEdition%,comp:eq,value2:ServerRdsh
SET OSEdition=Multi-Session
IF=value1:%OSEdition%,comp:eq,value2:EnterpriseS
SET OSEdition=LTSC 2021
SET myProductName=Windows 10 %osedition%
IF=value1:%OSBuild%,comp:ge,value2:22000
SET MyProductName=Windows 11 %osedition%
OSBUILD2=color:%orange%,text:Operating System,display:%MYProductName% (%18)
-
-
-
This reply was modified 9 months ago by
-
-
AuthorPosts
- You must be logged in to reply to this topic.