In tip 0643, we used the freeware gettype.exe to determine the Windows NT product type.
In tip 0869, we learned where the product type is stored in the registry, and its' possible data values.
Using the freeware REG, I have scripted JSINTPT.bat. To use it:
call jsintpt
JSINTPT will return a NTPT environment variable, which contains one of the following values:
"None"
"WinNT"
"LanmanNT"
"ServerNT"
"Terminal Server"
"Enterprise"
To test it, use statements similar to:
if %NTPT%
"None" goto other
if %NTPT%
"LanmanNT" goto dc
NOTE: You do not enclose %NTPT% in double quotes because its' value is double quoted.
JSINTPT.bat contains:
@echo off if /i "%OS%"=="Windows_NT" goto WINNT set NTPT="None" goto end :WINNT for /f "Tokens=*" %%i in ('regfree -Quiet -ListValue hklm\system\currentcontrolset\control\ProductOptions\ProductType') do set NTPT="%%i" set NTPT=%NTPT:REG_SZ =% :end
0 comments
Hide comments