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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

win version in Batch file

Status
Not open for further replies.

adiMasher

Programmer
Aug 31, 2001
144
US
simply enough.

I have two processes, on for nt and the other for 9x. and I want a batch file or something equivelent to execute the appropriate command base upon which system it is running on.

I've tried a few things and they don't work on all levels of windows. so the question is

How do I determine the windows version inside a batch routine?

Thanks,
Martin If the sky is blue and the Sun is yellow.... Why isn't the air Green?
 
Check out and see if there's something there to help. Glen A. Johnson
Microsoft Certified Professional
glen@nellsgiftbox.com
[yinyang]
"Take nothing on its looks: take everything on evidence. There's no better rule."
Charles Dickens (1812-1870); English novelist, dr
 
Hi,
you can use the %os% variable to check if your are running WinNT/2k or Win9x
or you can look at the resource Kit, there you find the tool "gettype.exe".
An other way is to check for a specific file for example if musrmgr.exe exists then you are running WinNT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top