Results 1 to 10 of 10

Thread: Detect Windows 10 version (1909, 2004, ect...)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2020
    Posts
    1

    Cool Detect Windows 10 version (1909, 2004, ect...)

    Hello! It's my first post!
    I wanted to ask how to detect the version of Windows 10. For example:

    Code:
    If Windows 10 2004 Then
       MessageBox.Show ("Version 2004")
    ElseIf Windows 10 1909 Then
       MessageBox.Show ("Version 1909")
    'And more
    End If
    Thank you so much in advance!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,296

    Re: Detect Windows 10 version (1909, 2004, ect...)

    You're off to an inauspicious start. You have posted in the VB.NET CodeBank forum, which is for sharing working code samples. I have asked the mods to move this thread to the VB.NET forum, which is for questions. Please don't double post in the mean time.

  3. #3
    Fanatic Member
    Join Date
    Aug 2004
    Location
    Essex, UK
    Posts
    750

    Re: Detect Windows 10 version (1909, 2004, ect...)

    This will give you something like "Microsoft Windows 10 Pro":
    Code:
    Label1.Text = My.Computer.Info.OSFullName
    Whereas this:
    Code:
    Label1.Text = Environment.OSVersion.ToString
    ... gives "Microsoft Windows NT 6.2.9200.0" on my Win 10 1909 PC. There may be an easy look-up from NT version to build version but I'll leave that for you to find.

  4. #4
    Fanatic Member
    Join Date
    Aug 2004
    Location
    Essex, UK
    Posts
    750

    Re: Detect Windows 10 version (1909, 2004, ect...)

    So, I was curious and Googled it myself. You can get the build number from the registry:

    Code:
    Label1.Text = Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ReleaseId", "").ToString()
    You can also get the ProductName from the same key which will give you the "Windows 10 Pro" bit.
    Last edited by paulg4ije; Jun 23rd, 2020 at 03:23 AM.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,296

    Re: Detect Windows 10 version (1909, 2004, ect...)

    Quote Originally Posted by paulg4ije View Post
    I was curious and Googled it myself.
    Googled it yourself you say? I didn't know that was possible.

  6. #6
    Fanatic Member
    Join Date
    Aug 2004
    Location
    Essex, UK
    Posts
    750

    Re: Detect Windows 10 version (1909, 2004, ect...)

    Google is your friend ;-)

  7. #7
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,582

    Re: Detect Windows 10 version (1909, 2004, ect...)

    Quote Originally Posted by jmcilhinney View Post
    Googled it yourself you say? I didn't know that was possible.
    Probably useful concept for the Thread Starter.
    "Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,296

    Re: Detect Windows 10 version (1909, 2004, ect...)

    Quote Originally Posted by passel View Post
    Probably useful concept for the Thread Starter.
    Was I too subtle?

  9. #9
    Fanatic Member Delaney's Avatar
    Join Date
    Nov 2019
    Location
    Paris, France
    Posts
    845

    Re: Detect Windows 10 version (1909, 2004, ect...)

    I found this : How to search on Google

    and this : How to Use Google Search

    and the icing on the cake cake : How to Use Google to Solve Your Programming Questions

    maybe useful to put that at the top of the forum

    (of course, I used a search engine to find that )
    The best friend of any programmer is a search engine
    "Don't wish it was easier, wish you were better. Don't wish for less problems, wish for more skills. Don't wish for less challenges, wish for more wisdom" (J. Rohn)
    “They did not know it was impossible so they did it” (Mark Twain)

  10. #10
    PowerPoster ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    3,040

    Re: Detect Windows 10 version (1909, 2004, ect...)

    Quote Originally Posted by Delaney View Post
    I found this : How to search on Google

    and this : How to Use Google Search

    and the icing on the cake cake : How to Use Google to Solve Your Programming Questions

    maybe useful to put that at the top of the forum

    (of course, I used a search engine to find that )
    LOL
    I tried to rate you for that but couldn't
    ...You must spread some Reputation.... and so on

    thanks for the laugh
    to hunt a species to extinction is not logical !
    since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width