[Batch] Retrieve Edition of Winodws 7

Discussion in 'Scripting' started by DARKOR04, Jan 31, 2011.

  1. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    495
    889
    10
    #1 DARKOR04, Jan 31, 2011
    Last edited by a moderator: Apr 20, 2017
    Code:
    @echo off
    for /f "tokens=3" %%A in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') do set os=%%A
    echo. Windows Edition: %os%
    pause
    Copy Code and paste it on Wordpad then save it as somename.bat.