WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Determine Platform - OS

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

WinVersion and How to Determine OS

Keywords: 	 W2K Win2000 XP WinVersion

Question:

How can I determine if the OS is Windows2000 using Winversion(?) or other winbatch function?

Answer:

I like to use WinVersion(5).

Single function. Returns everything required to identify a particular version of windows.

To check for Windows 2000:

2-5-0

To check for Windows XP:

2-5-1

OS="Unrecognized OS"
Plat=WinVersion(5)
if Plat=="1-4-0" then OS="Windows 95"
if Plat=="1-4-10" then OS="Windows 98"
if Plat=="1-4-90" then OS="Windows ME"
if Plat=="2-3-51" then OS="NT 3.51"
if Plat=="2-4-0" then OS="NT 4.0"
if Plat=="2-5-0" then OS="Windows 2000"
if Plat=="2-5-1" then OS="Windows XP"

Article ID:   W14369
Filename:   Determine if Win2000 is OS.txt
File Created: 2001:10:31:17:07:34
Last Updated: 2001:10:31:17:07:34