DelphiFAQ Home Search:
General :: Windows :: Network
Network setup and administration. Both from Windows and Linux angles.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

Programmatically setting the network connection to DHCP instead of a static IP

Question:

Is there a commandline tool to switch the network connection from a static IP to DHCP?

Answer:

(Applies to Windows 2000, NT 4 and XP)
Yes. Use the netsh commandline scripting utility. It allows you to display or modify the network configuration of your local or a remote computer. You can even feed it a batch file if you repeatedly need to do the same thing.

For your request, you might want to write a batch file with these 2 statements:

netsh interface ip set address "Local Area Connection" dhcp
 netsh interface ip set dns "Local Area Connection" dhcp
 

Generated 0:02:21 on Dec 13, 2017