_DOS returns the operating system type. TCC returns different values depending on the operating system, as follows:
Platform |
Take Command |
Windows 8 |
WINDOWS8 |
Windows 2012 Server |
WIN2012 |
Windows 8.1 |
WINDOWS81 |
Windows 2012R2 Server |
WIN2012R2 |
Windows 10 |
WINDOWS10 |
Windows 11 |
WINDOWS11 |
Windows 2016 Server |
WIN2016 |
Windows 2019 Server |
WIN2019 |
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.