Find Windows 10 Version Number  

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 16,914
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #10

    If you want to obtain OS Edition, Type [x64/x86], Version, Build using a batch file then you could use this one -

    Code:
    @echo off
    prompt $g
    
    :: Windows Edition
    Set UseExpresssion=Reg Query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "ProductName"
    for /F "tokens=*" %%X IN ('%UseExpresssion%') do Set OSEdition=%%X
    Set OSEdition=%OSEdition:*REG_SZ    =%
    echo %OSEdition%
    
    :: Windows Type
    If Defined ProgramFiles(x86) (Set OSType=x64) Else (Set OSType=x86)
    echo %OSType%
    
    :: Windows Version
    Set UseExpresssion=Reg Query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "ReleaseId"
    for /F "tokens=*" %%X IN ('%UseExpresssion%') do Set OSVersion=%%X
    Set OSVersion=%OSVersion:*REG_SZ    =%
    echo %OSVersion%
    
    :: Windows Build - this includes the full build number such as Build 17134.376
    Set UseExpresssion=Ver
    for /F "tokens=*" %%X IN ('%UseExpresssion%') do Set OSBuild=%%X
    Set OSBuild=%OSBuild:*10.0.=%
    Set OSBuild=%OSBuild:~0,-1%
    echo %OSBuild%
    
    :EndGetSystemProperties
    :: this consolidated output now shows, for example, Windows 10 Home x64 Version 1803 Build 17134.376
    echo %OSEdition% %OSType% Version %OSVersion% Build %OSBuild%
    Pause at EndGetSystemProperties during testing

    I have tested this on Ver 1709 & Ver 1803 [x64 and x86]. It has also been tested on Ver 1809.

    In practice, I call this from other batch files & I omit / remark out the lines @echo off and Pause at End

    If I merely want to display the various parameters rather than use them elsewhere, I use a shortcut to the batch file that has this as its Target property
    Code:
    %windir%\system32\cmd.exe /k "C:\Tools\ReportOSVersion.bat"
    - This will remain open onscreen despite having that final Pause line omitted / remarked out.

    I call my batch file ReportOSVersion.bat and I save it along with all my other batch, vbs, PS & similar files within C:\Tools for which I have curtailed non-Admin user permissions to:- Read & execute, List folder contents, Read. Doing so mimics the protection Windows applies to the Program files folders.

    Denis
    Last edited by Try3; 14 Nov 2018 at 01:30.
      My Computer


  2. Posts : 13,987
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #11

    Try3 said:
    If you want to obtain OS Edition, Type [x64/x86], Version, Build using a batch file then you could use this one -

    Code:
    prompt $g
    
    :: Windows Edition
    Set UseExpresssion=Reg Query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "ProductName"
    for /F "tokens=*" %%X IN ('%UseExpresssion%') do Set OSEdition=%%X
    Set OSEdition=%OSEdition:*REG_SZ    =%
    echo %OSEdition%
    
    :: Windows Type
    If Defined ProgramFiles(x86) (Set OSType=x64) Else (Set OSType=x86)
    echo %OSType%
    
    :: Windows Version
    Set UseExpresssion=Reg Query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "ReleaseId"
    for /F "tokens=*" %%X IN ('%UseExpresssion%') do Set OSVersion=%%X
    Set OSVersion=%OSVersion:*REG_SZ    =%
    echo %OSVersion%
    
    :: Windows Build - this includes the full build number such as Build 17134.376
    Set UseExpresssion=Ver
    for /F "tokens=*" %%X IN ('%UseExpresssion%') do Set OSBuild=%%X
    Set OSBuild=%OSBuild:*10.0.=%
    Set OSBuild=%OSBuild:~0,-1%
    echo %OSBuild%
    
    :EndGetSystemProperties
    :: this consolidated output now shows, for example, Windows 10 Home x64 Version 1803 Build 17134.376
    echo %OSEdition% %OSType% Version %OSVersion% Build %OSBuild%
    ::Pause at EndGetSystemProperties during testing

    I have tested this on Ver 1709 & Ver 1803 [x64 and x86].

    Denis
    The only thing I don't see in that .bat file is where the output of it goes after it closes, very fast. Another Pause by itself after the last line in your file does keep it on the screen and is scrollable.
      My Computers


  3. Posts : 31,604
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #12

    Try3 said:
    I have tested this on Ver 1709 & Ver 1803 [x64 and x86].
    I have tested it in 1809 for you. In addition to Berton's PAUSE, may I suggest a first line of @ECHO OFF
    Find Windows 10 Version Number-image.png Find Windows 10 Version Number-image.png
      My Computers


  4. Posts : 13,987
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #13

    Thanks for that line, Bree, forgot about it, does clean it up.
      My Computers


  5. Posts : 16,914
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #14

    @Bree, @Berton,

    You are both right of course. I have amended my post.

    Denis
      My Computer


  6. Posts : 31
    Windows 10 Pro (10.0.18362)
       #15

    ..........
    Last edited by Sawuwaya; 14 Dec 2018 at 12:06.
      My Computer


  7. Posts : 13,987
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #16

    This is how Microsoft enumerates Windows:
    Attachment 217267
    The .bat file does give a bit more information.
    Last edited by Brink; 14 Dec 2018 at 13:28. Reason: blanked email address in image
      My Computers


  8. Posts : 7,254
    Windows 10 Pro 64-bit
       #17

    You might want to hide your email.
      My Computers


  9. Posts : 13,987
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #18

    Thanks, got in a hurry helping wife prepare a church meal for a funeral.
      My Computers


  10. Posts : 16,914
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #19

    Berton said:
    The .bat file does give a bit more information.
    The only point of the bat is that it captures the data for use elsewhere.

    Denis
      My Computer


 

Tutorial Categories

Find Windows 10 Version Number Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:57.
Find Us




Windows 10 Forums