Hi,
Version is located at
Hive: HKEY_LOCAL_MACHINE
Key: Software\Microsoft\Windows NT\CurrentVersion
The following values tell the following information:
CSDVersion = Service Pack
CurrentBuildNumber = build number
CurrentVersion = version number
ProductName = Windows Version name
Batch file creation
===============
1. Open a notepad file
2. Copy the lines to a text editor like notepad and save the file as
filever.bat.
NOTE: The text might wrap
----------------Start of line -----------------------------
@ECHO OFF
:: delims is a TAB followed by a space
SET DOT=.
SET SPACE= [Version
SET CLOSE=]
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY
"HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v ProductName') DO SET
Prod=%%B
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY
"HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion') DO
SET Version=%%B
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY
"HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v CurrentBuildNumber')
DO SET CBN=%%B
ECHO %PROD%%SPACE%%Version%%DOT%%CBN%%CLOSE%
PAUSE
----------------End of line-----------------------------
Hope this helps ......
Ashok (Ashokan Achari)
The Posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
- - From: "=?Utf-8?B?UmFkdQ==?=" <
[email protected]>
- - Subject: windows version registry key
- - Date: Sun, 10 Oct 2004 14:59:02 -0700
- - Newsgroups: microsoft.public.windowsxp.help_and_support
- -
- - Hello,
- -
- - I need to create a batch file and I need to now witch registry key
holds the
- - windows version data value.
- -
- - Thanks,
- -
- - Radu
- -