In this post,You’ll learn how to easily reset your IP information from a different batch file.
This tip works in Windows XP/Vista/ 7 / 8.
Why Would You Use This?
Lets say you transport your laptop to and from work. At work you use a static IP and at home you use DHCP. This batch file will automatically change your network settings to DHCP.
How To Use?
- Open Notepad or any text editor.
- copy/paste this code into it
- save the new text file with a .bat extension, for example use “reset-IP-to-DHCP.bat” (don’t remove the double quotes!).
After creating the batch file, just :
- Windows XP : Double click on it.
OR
- Windows Vista / 7 / 8 : Right click and then click on “Execute As Administrator”.
Make a note of the name of the connection that you are anting to control. in my case I am working with the LAN connection.
Get Your Code
@ECHO OFF
ECHO !——————— _ ————————————!
ECHO !– Visit our website for more useful Howto’s and tools –!
ECHO !– http://it-n-careerz.blogspot.com/ ——————-!
ECHO !——————— _ ————————————!
ECHO Resetting IP Address and Subnet Mask For DHCP netsh int ip set address name = “LAN” source = dhcp
ECHO Resetting DNS For DHCP netsh int ip set dns name = “LAN” source = dhcp
ECHO Resetting Windows Internet Name Service (WINS) For DHCP netsh int ip set wins name = “LAN” source = dhcp
ECHO Here are the new settings for %computername%: netsh int ip show config
pause
Download
You can get the file from HERE, just extract the zip file and use it (Yaay!).
Hungery for More ?
You can get more details on how the commands above work, and how you can customize them. Just visit this link.
Which tool is most effective to change static ip to dynamic ip?
Thanks
Silvester Norman
Change MAC Address
you actually don't need any tool. Just use the code above, and you'll get what you're looking for, without installing anything.