which OS using DOS for WinXP

L

Lloyd

I'm writing a batch file which will run on a multitude of
operating systems from Win98 to Millenium to Win2000 to
WinXP, and I need to use a DOS command in this batch file
which identifies the particular operating system.

Can anyone tell me which is the best command to do this?
I guess it's systemInfo? But I'm not sure if this only
works on DOS for WinXP? Also I'm wondering how to
specifically capture the OS name into a variable from
systemInfo, since there's a lot of other stuff it pulls.

Thanks for any suggestions on this.

Lloyd
 
K

Ken Blake, MVP

In
Lloyd said:
I'm writing a batch file which will run on a multitude of
operating systems from Win98 to Millenium to Win2000 to
WinXP, and I need to use a DOS command in this batch file
which identifies the particular operating system.

Can anyone tell me which is the best command to do this?
I guess it's systemInfo? But I'm not sure if this only
works on DOS for WinXP? Also I'm wondering how to
specifically capture the OS name into a variable from
systemInfo, since there's a lot of other stuff it pulls.


Use the command VER
 
A

Alex Nichol

Lloyd said:
I'm writing a batch file which will run on a multitude of
operating systems from Win98 to Millenium to Win2000 to
WinXP, and I need to use a DOS command in this batch file
which identifies the particular operating system.

Can anyone tell me which is the best command to do this?

Use VER
You will need to check on just how the message is then expressed in each
system.

Not that there is a basic difference between the 9x series of WIndows
and the NT (including 2000 and XP). 9x DOS windows run actual 16 bit
DOS code within a 'Virtual 86' virtual machine. NT runs a 32 bit
emulator which may not give just the same results, especially make sure
error codes are consistent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top