How To Change IP Address Using A Batch File Script On
How To Change IP Address Using A Batch File Script On
on Windows?
Posted by: lakkireddymadhu on: August 11, 2014
In: Technology
2 Comments
@echo off
ipconfig /flushdns
ipconfig /release
netsh interface set interface "Local Area Connection" disable
netsh interface ip set dns "Local Area Connection" static
netsh interface ip set address "Local Area Connection" static
echo Wait 5 seconds...
ping -n 60 -w 1000 0.0.0.1 > nul
netsh interface set interface "Local Area Connection" enable
netsh interface ip set address "Local Area Connection" static 192.168.XXX.XX
255.255.255.0 192.168.XXX.X
netsh interface ip set dns "Local Area Connection" static 192.168.XXX.XXX
To change the IP Address to obtain an IP address automatically or to remove the IP Address,
Copy the code given below in the Notepad and save it with the .bat extension.
@echo off
ipconfig /flushdns
ipconfig /release
netsh interface set interface "Local Area Connection" disable
netsh interface ip set dns "Local Area Connection" dhcp