JSI Tip 0643 - What type of Windows NT am I logged onto?

Jerold Schulman

August 10, 1998

1 Min Read
ITPro Today logo in a gray background | ITPro Today


To determine the type of Windows NT that you are logged onto, download gettype.zip and unzip it. I have created a Gettype.bat that is CALLed in a login script:

@echo offset ERRORLEVEL=if /i %OS% == Windows_NT goto WINNTset ERRORLEVEL=6goto ERRL:WINNT%LogonServer%etlogongettype.exe:ERRLset NTNUM=%ERRORLEVEL%goto T%ERRORLEVEL%:T6SET NTTYPE="Unknown"goto END:T5SET NTTYPE="Windows NT [Enterprise/Terminal] Server Domain Controller"goto END:T4SET NTTYPE="Windows NT [Enterprise/Terminal] Server Non-Domain Controller"goto END:T3SET NTTYPE="Windows NT Server Domain Controller"goto END:T2SET NTTYPE="Windows NT Server Non-Domain Controller"goto END:T1SET NTTYPE="Windows NT Workstation":END

The batch file returns two environment variables, NTNUM and NTTYPE which you can use.



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like