_DOS returns the operating system type. Take Command returns a different value depending on the operating system, as follows:

 

Platform

Take Command

Windows Vista

WINVISTA

Windows 2008 Server

WIN2008

Windows 7

WINDOWS7

Windows 8

WINDOWS8

Windows 2012 Server

WIN2012

Windows 8.1

WINDOWS81

Windows 2012R2 Server

WIN2012R2

Windows 10

WINDOWS10

 

 

This variable is useful if you have batch files running in more than one environment, and need to take different actions depending on the underlying operating environment or command processor. See also the _WINVER variable.