vb.net code to retrieve Windows version such as Fall Creators Update

Hi Experts,

I have some vb.net code that returns information about the Windows Version:

    Public Function GetWindowsVersion_AllInOneString() As String

        GetWindowsVersion_AllInOneString = My.Computer.Info.OSFullName & " " & My.Computer.Info.OSPlatform & " " & My.Computer.Info.OSVersion '20120605
    End Function

Open in new window

On my PC it returns:

Windows Version: Microsoft Windows 10 Pro Win32NT 6.2.9200.0

But I want to delve deeper than that - for example, to see if the Fall Creators Update is installed.

If I use the winver command in a command prompt, the screen that pops up shows:

Version 1709, OS Build 16299.125.
What vb.net code to I need to retrieve that information as a text string?

Who is Participating?
louisfrConnect With a Mentor Commented:
You can get the ReleaseId (1709) in the registry:
Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ReleaseId", "")

Open in new window

LeighWardleAuthor Commented:
Thanks, Louis.

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.