WIN 7 .bat file to change IP address .. DHCP problem

I have a few batch files that I use to switch NIC settings. These are all "Run as Administrator".

For static IP, I use this:



netsh interface ip set address name="Local Area Connection" dhcp


You have name="Local Area Connection" but not source=dhcp

Did you try it like that?



netsh interface ip set address name="Local Area Connection" dhcp


You have name="Local Area Connection" but not source=dhcp

Did you try it like that?



Instead of ip - you should use ipv4, the command would be:



I tried those things but nothing in the results has changed.

ipconfig result and the GUI result are different re: DHCP.



This is Windows 7 right? I tested on W7 64bit machine and it works just fine? Any error message you see in Windows event log maybe?



reboot... :-(
Everything works now.
Thanks all!

Share this

Related Posts

There was an error in this gadget