Qlemo/QCubed - the "VER" command does actually return the name as well (in Win2K Pro & WinXP Pro at least) in the following format:
Microsoft Windows xx [Version x.x.xxxx]
I use it in a few of my scripts to determine the OS so that it controls which menu the user is presented with... so I know for sure that it works... Having said that - this may be something in the PRO OS's??
Qlemo
You are correct, but that stopped with W2003. Since then, all "versions" are "Microsoft Windows".
This has turned into a lively discussion now. I have increased the overall point value to 500 but am hesitant to close it again just yet.
Jofnn: Qlemo is correct. The results of running VER on a windows 2003 server:
Microsoft Windows [Version 5.2.3790]
vs. running on a windows XP Pro workstation:
Microsoft Windows XP [Version 5.1.2600]
Steven Carnahan
ASKER
It seems the discussion has died down but I do appreciate everyone's input. Thank you again QCubed for the code and everyone else for confirming what QCubed and I were thinking. Since the question was for QCubed to post his code I awarded him 200 of the 500 and split the remaining 300 (100 each) between the others.
goto %OS%
Windows 200 and up is set to "Windows_NT". You will have to check to see what Windows 95 has.