System Information Unit v5.2.0 Released
I've just released v5.2.0 of the System Information Unit.
This release adds support for detecting and reporting on the new "November Update" TH2 release of Windows 10.
This has been quite hard to detect because although Microsoft bumped the build number they haven't classed the update as a service pack, so TPJOSInfo reports no service pack as being present. In fact everything looks the same as the original Windows 10 except for the build number.
To allow users to display a bit more information when running on Windows 10 TH2 I've added a new ServicePackEx method to TPJOSInfo. This returns the same result as the existing ServicePack method when run on any OS prior to Windows 10 TH2. However on that OS ServicePack returns an empty string while ServicePackEx returns 'TH2: November Update'. The rationale of providing the new method is that I don't want to subvert ServicePack from its documented remit of reporting genuine service packs and only genuine service packs.
The intention is that ServicePackEx will also detect any future major updates that aren't classed as service packs by MS. Whether this is possible remains to be seen.
The other change in v5.2.0 is that the TPJOSInfo.BuildNumber method now always returns 0 if it can't determine the build number. Prior to this BuildNumber would sometimes try to get a build number from the registry as a last resort. This feature has been removed because it's become apparent that the registry can return the incorrect value for the build number despite the correct number actually being visible when the registry is viewed in regedit. It seems like Windows is spoofing the registry to report an older OS in these circumstances.
Well it all gets more and more complicated with each release of Windows doesn't it!
This release adds support for detecting and reporting on the new "November Update" TH2 release of Windows 10.
This has been quite hard to detect because although Microsoft bumped the build number they haven't classed the update as a service pack, so TPJOSInfo reports no service pack as being present. In fact everything looks the same as the original Windows 10 except for the build number.
To allow users to display a bit more information when running on Windows 10 TH2 I've added a new ServicePackEx method to TPJOSInfo. This returns the same result as the existing ServicePack method when run on any OS prior to Windows 10 TH2. However on that OS ServicePack returns an empty string while ServicePackEx returns 'TH2: November Update'. The rationale of providing the new method is that I don't want to subvert ServicePack from its documented remit of reporting genuine service packs and only genuine service packs.
The intention is that ServicePackEx will also detect any future major updates that aren't classed as service packs by MS. Whether this is possible remains to be seen.
The other change in v5.2.0 is that the TPJOSInfo.BuildNumber method now always returns 0 if it can't determine the build number. Prior to this BuildNumber would sometimes try to get a build number from the registry as a last resort. This feature has been removed because it's become apparent that the registry can return the incorrect value for the build number despite the correct number actually being visible when the registry is viewed in regedit. It seems like Windows is spoofing the registry to report an older OS in these circumstances.
Well it all gets more and more complicated with each release of Windows doesn't it!
Thank you very much! This is much faster than from WMI.
ReplyDeleteGlad you like it.
ReplyDeleteKeep in mind, that your unit does NOT work, if the application does not include the WIndows 10 ID in the Manifest.
ReplyDeleteAccording to your unit, you use GetWin32Major/Minor/Build. But these report 6.2 build 9600 on TH2 if the id is not included in the manifest(Delphi XE) which is a API-Quirk from Windows 8.1
An option seems to be the registry here:
HKLM\SOfwtare\Microsoft\Windows NT\CurrentVersion
reports:
BuildBranch: th2_release
Major: 10
Minor: 0
BuildNumber: 10586
regardless of the manifest.
PS: ok just found a comment about the registry being spoofed. I used Delphi XE and TRegistry, no spoofing. Got all the data as it is o.O
Thanks for the comments Alexander.
ReplyDeleteYour comment about the registry returning the correct values with Windows 10 the2 is interesting, because I tested with Delphi de and win 10 th2 like you and I got a spoofed value back - reported win 8! This is weird!
Re needing a Windows 10 app manifest. I've documented that this is the case in the docs. I provided new versions of the Delphi Win32Major globals that do work on (manifested) win 10 etc. Look for Win32MajorEx etc.
Cheers
Peter
Delphi De? Do you mean XE or DX o.O
ReplyDeleteAbout the registry:
Can you create a small simple program?
(Just the registry stuff)
Zip the source together with a compiled version. I'd like to test how this ends up. Maybe i can spot the odd (if there is any on the softwareside)
I can not test this right away, as i am not at work until next year(holidays!^^), but i plan to upgrade my home-pc from W7 to W10 this holiday. I have XE and XE6 at home.
Bloody auto correct! I meant Delphi XE!
ReplyDeleteI'll try to pull something together re the registry that uses similar code to the main unit over the holidays.