Function OSBUILD2 a...
 
Notifications
Clear all

We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!

Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.

Function OSBUILD2 and Win11

3 Posts
3 Users
0 Reactions
448 Views
(@markusmoench)
Eminent Member Registered
Joined: 4 years ago
Posts: 17
Topic starter  

Hello Glenn,
Thanks for you great tool.
Running the most recent version of DTI 3.10.2.4365 I just stumbled on using the function OSBUILD2.
Windows 11 as host OS is correctly shown with value %1, but using %21 returns "Windows 10" instead.
Please see attached screenshot.

OSBUILD2=text:,interval:0,display:%21 %18 (%3 %2)
OSBUILD2=text:,interval:0,display:%1

Is there something I can do to show the correct version with using %21 ?

Best regards
Markus


   
Quote
(@rtruss)
Trusted Member Registered
Joined: 4 years ago
Posts: 75
 

Here is what I did to accommodate for the various os 'names' we have to contend with. Hope it helps.

# needed to account for Windows 11 as there are some items that still report win 10 like productname
REG=set:OSBuild,value:HKLMSOFTWAREMicrosoftWindows NTCurrentVersionCurrentBuild,display:%1,hidden:1
REG=set:OSEdition,value:HKLMSOFTWAREMicrosoftWindows NTCurrentVersionEditionID,display:%1,hidden:1
SET myProductName=Windows 10 %osedition%
IF=value1:%OSEdition%,comp:eq,value2:EnterpriseS
SET MyProductName=Windows 10 LTSC 2021
IF=value1:%OSBuild%,comp:ge,value2:22000
SET MyProductName=Windows 11 %osedition%
OSBUILD2=color:%orange%,text:Operating System,display:%MYProductName% (%18)


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1501
 

crazy isn't it, that Windows doesn't know it's own version?

%1 is from WMI, %21 is from the registry. Sometimes they match with reality, sometimes not. I think rtruss has the right idea by using the build number to get the right version.


   
ReplyQuote
Glenn's Page