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.
August 10, 1998
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.
You May Also Like