On Sun, 28 Sep 2003 13:27:19 -0700, "Craig" <(E-Mail Removed)> wrote:
>Hi folks,
>I'm trying to use reg.exe to capture the value from
>the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
>NT\CurrentVersion" /v ProductName and put in into a
>variable (so I can use it in a batch file)...but I can't
>figure it out!!! Suggestions???
>
>Thanks,
>Craig
The following is one line:
for /f "Skip=4 Tokens=2*" %%i in ('reg query
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v
ProductName') do set PN=%%j
Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com