Path: number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!newscon04.news.prodigy.net!prodigy.net!newsdst01.news.prodigy.net!prodigy.com!postmaster.news.prodigy.com!newssvr12.news.prodigy.net.POSTED!eadf9591!not-for-mail
From: 0@0.0 (FileGod)
Newsgroups: alt.msdos.batch,alt.msdos.batch.nt,fidonet.batpower
Subject: GetSys.bat (Detecting Operating System)...
Lines: 70
Message-ID:
NNTP-Posting-Host: 71.142.49.55
27 Mar 2008 05:39:40 EDT)
NNTP-Posting-Date: Thu, 27 Mar 2008 05:39:40 EDT
Organization: SBC http://yahoo.sbc.com
Date: Thu, 27 Mar 2008 09:39:40 GMT
Bytes: 2583
Xref: number1.nntp.dca.giganews.com alt.msdos.batch:93706
alt.msdos.batch.nt:42598 fidonet.batpower:594
I was thinking of writing a batch file like this but someone else beat me
to it, thats ok since it will save me time but this does not cover Vista or
DOS, anyone want to post the output from Vista using the command VER, heck I
even forget what DOS says...
@ECHO OFF
:: Win9x checks ::::::::::::
VER |find /i "Windows 95" >NUL
IF NOT ERRORLEVEL 1 GOTO W9598ME
VER |find /i "Windows 98" >NUL
IF NOT ERRORLEVEL 1 GOTO W9598ME
VER |find /i "Windows Millennium" >NUL
IF NOT ERRORLEVEL 1 GOTO W9598ME
:: NT/XP checks ::::::::::::
VER | find "XP" > nul
IF %errorlevel% EQU 0 GOTO s_win_XP
VER | find "2000" > nul
IF %errorlevel% EQU 0 GOTO s_win_2000
VER | find "NT" > nul
IF %errorlevel% EQU 0 GOTO s_win_NT
ECHO Unknown OS !
GOTO :EOF
:: Win9x commands ::::::::::::
:W9598ME
ECHO Win9x commands go here
GOTO :EOF
:W98
ECHO Win98 commands go here
GOTO :EOF
:: NT/XP commands ::::::::::::
:s_win_XP
ECHO XP commands go here
goto :eof
:s_win_2000
ECHO WIN2K commands go here
goto :eof
:s_win_NT
ECHO NT4 commands go here
goto :eof
:EOF (End-of-file)Service Pack Version
This Batch script will give the Service Pack level.
Works for NT, Win2K or WinXP
Bugs
The VER command reports the version of CMD.exe, so if for example you run
the Win XP version of CMD under NT 4 then the VER command will return:
Microsoft Windows XP [Version 4.0.1381]
I found this here:
http://www.fortypoundhead.com/showcontent.asp?ArtID=837
|