Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for revision part of Windows build numbers (aka UBR, "Update Build Revision") #41

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Yaribz
Copy link

@Yaribz Yaribz commented Apr 10, 2024

This makes it possible to access the full Windows version number easily from Perl scripts and show the exact same versions as core Windows components, for example hereafter from cmd banner "10.0.22621.3447":

Microsoft Windows [Version 10.0.22621.3447]
(c) Microsoft Corporation. All rights reserved.

C:\Users\User>perl -MWin32 -e "print scalar Win32::GetOSFullVersion()"
10.0.22621.3447

Yaribz added 3 commits April 10, 2024 20:23
Returns the current Update Build Revision (UBR) of the Win32 operating
system if applicable, or undef otherwise. The UBR number is the last
part of the build numbers used by Microsoft to identify the exact
Windows revisions.
Append the UBR number to the build number returned in the $desc string
by the _GetOSName function when it cannot resolve the build number to a
specific version.
In scalar context returns a string containing the full version of the
Win32 operating system (including revision number if applicable), in
following format: <major>.<minor>.<build>.<revision> (example for
Windows 10 version 22H2 build 19045.4170: "10.0.19045.4170"). In list
context returns the same numbers in a list instead: ($major, $minor,
$build, $revision).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant