How to determine if the machine is NT server or workstation



Some customers have asked how to determine if the NT machine the runtime is executing on is a workstation or a server. The runtime has no way of determining this. However, we did find a way to do this using the following in a batch file:

@echo off
for /f "usebackq tokens=3" %%i in (`reg query
     "HKLM\System\CurrentControlSet\Control\ProductOptions\ProductType"`)
     do @set _GETNTTYPE=%%i
if "%_GETNTTYPE%"=="WinNT" set NTTYPE=wks
if "%_GETNTTYPE%"=="ServerNT" set NTTYPE=srv
if "%_GETNTTYPE%"=="LanmanNT" set NTTYPE=srv
if "%_GETNTTYPE%"=="LanmanNT" set ISDC=1
Your Session will expire in 90 minutes
Notification will be shown in:
600 seconds