Regex & Rainmeter - Clarification of Win 10 "winver" output

I'm using the following to get a version build from Window's Registry:

Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SYSTEM\Software\Microsoft
RegValue=BuildLab

Open in new window


The output from Windows is: 16299.rs3_release.170928-1534

MeasureName=Measure.OS_Service_Pack
Meter=STRING
X=#X#
Y=#Line_05#
W=#Width#
StringStyle=NORMAL
StringAlign=CENTER
FontColor=#fontColor.Text#
FontSize=#FontHeight#
FontFace=#FontName#
Antialias=1
Text="Version: %1"

Open in new window


The final output on Rainmeter is: Version: 16299.rs3_release.170928-1534

I need to update this to: Version: 1709 (OS Build 16299.125) - the same result as the output from running "winver" on a Win 10 machine.

Any ideas?
Mike DiasAsked:
Who is Participating?
 
zvitamConsultantCommented:
You can get the current version from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseId (Value 1709)

You can get the current build from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentBuild (Value 16299)

You Can get the minor build nuber from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UBR (Value 125)

In order to get the same output as winver you just have to do some formatting.

Hope that helps,
Zvitam.
0
 
JohnBusiness Consultant (Owner)Commented:
You have an Insider release on this machine.  See if you can run a Repair Install from the Microsoft Media Creation Link to get to V1709.

Otherwise update the machine to V1803. My insider machine is at V1803.

All else fails Microsoft says be prepared to format and reinstall a production version
0
 
Mike DiasAuthor Commented:
Thanks Zvitam. I can bridge the two registry values (1709) and (16299) without needing Regex.

Wasn't aware of the minor build reference.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Mike DiasAuthor Commented:
I can bridge the two registry values (1709) and (16299) without needing Regex.
0
 
JohnBusiness Consultant (Owner)Commented:
I was addressing getting back to production. The only production release you can get now (as of today) is V1803 . You cannot get back to V1709 now without formatting and installing fresh
0
 
zvitamConsultantCommented:
The question was not about the installed version but how to display the windows version using  registry values
(The version was an example)
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.