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 off set ERRORLEVEL= if /i %OS% == Windows_NT goto WINNT set ERRORLEVEL=6 goto ERRL :WINNT %LogonServer%\netlogon\gettype.exe :ERRL set NTNUM=%ERRORLEVEL% goto T%ERRORLEVEL% :T6 SET NTTYPE="Unknown" goto END :T5 SET NTTYPE="Windows NT \[Enterprise/Terminal\] Server Domain Controller" goto END :T4 SET NTTYPE="Windows NT \[Enterprise/Terminal\] Server Non-Domain Controller" goto END :T3 SET NTTYPE="Windows NT Server Domain Controller" goto END :T2 SET NTTYPE="Windows NT Server Non-Domain Controller" goto END :T1 SET NTTYPE="Windows NT Workstation" :ENDThe batch file returns two environment variables, NTNUM and NTTYPE which you can use.
0 comments
Hide comments