Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


How to Determine if a User is Running DHCP

Keywords:   DHCP  WINIPCFG /BATCH

Question:

Is there a simple way to discover if a user is running DHCP or not? Testing would need to be done on both 95 and NT4.0 systems.

Answer:

The best way is to use the "undocumented" (found out about on this BBS, think it's in the Tech Support Database) command line switches for the WINIPCFG command.

   WINIPCFG /BATCH /ALL C:\TEMP\FILENAME.TXT
Then you parse the file above (FILENAME.TXT or any other name) for the line

   DHCP Enabled. . . . . . . . : Yes
or any other info you may want.
Find out if DHCP is Enabled

Question:

Is there a way to find out if DHCP is enabled using the registry on a Windows NT 4.0 system.

I do not want to run a seperate program and parce the information from a text file. To many things can go wrong this way.

Answer:

Just have to find the registry key to check.

;this key will give you all IP related information including EnableDHCP. 
;to determine which NIC Card you have in your system, check out..
HKLM\System\CurrentControlSet\Services\%NICCard%\Parameters\TCPIP")
HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkCards\%i% 

Article ID:   W13142
Filename:   Detect if a User is Running DHCP.txt