Retrieve Windows ReleaseId with vba

nilmol

New Member
Joined
Jun 12, 2017
Messages
11
Hello,

Is there a way to retrieve the Windows Release Id? Current releasid in my case being 1803, previous was 1709 and now coming up is probably 1810 or possibly 1811.

My current version is 17134 but Winver says 17134.345. Any ideas on how to retrieve the last three figures?

/nils
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
I'd say try to get it from the registry

Code:
Sub WinVerTest()
    Dim WinShell As Object
    Dim S As String
    Dim Build As String
    Dim WinVer As String
    
    Set WinShell = CreateObject("WScript.Shell")
    
    With WinShell
        WinVer = "Version " & WinShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseId")
        Build = "OS Build " & _
            WinShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentBuildNumber") _
            & "." & WinShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UBR")
        S = WinShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName") & vbCr
        S = S & WinVer & " (" & Build & ")"
        MsgBox S, vbInformation, "Windows Version"
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top