Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script to check which OS a client is running

Status
Not open for further replies.

bhogaj31

IS-IT--Management
Mar 11, 2003
114
0
0
GB
Hi

Does anyone know how to write a batch script for use as a login script which can check what OS my client is running.

E.g. It would check for something that is specific to Windows nt4 Workstation or Windows 2000 Pro or Win98 and do something different according to what it finds.

What would it check for?

Any help much appreciated.

 
u can do it like this:

@echo off
VER | FIND /I "Windows 95"
IF ERRORLEVEL 0 SET OSVER=Win95
IF ERRORLEVEL 1 SET OSVER=Win2K
IF %OSVER%==Win95 ECHO You are running Windows 95!
IF %OSVER%==Win2K ECHO You are running Windows 2000!


===============
Security Forums
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top