Company InformationOur COBOL SolutionsCOBOL Services and TrainingSupport for our CustomersAcucorp and COBOL EventsAcucorp's Partners


















< previous      next > Print this page  

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

####

Acucorp, extend and ACUCOBOL are trademarks or registered trademarks of Acucorp, Inc. All rights reserved. All other trademarks are the property of their respective owners.

 

 

Contact | Site Map | | Legal | Trademarks | Privacy | Print this page
Acucorp, Inc., 9920 Pacific Heights Blvd., San Diego, CA 92121, +1 858.795.1900
© 1999-2008, Acucorp, Inc. All rights reserved.


Get the most recent Code Updates
Download an Evaluation of ACUCOBOL- GT
View recorded Webinars and demos
Download the latest version of Acucorp News
Find out about the latest Training Opportunities
Language