The aim of this tutorial is to create a batch file using which you will be able to change your network settings with just a click of your mouse.
Why to create a batch file for changing network settings?
If you happen to use a laptop at your workplace and at home the you may have to change the network settings when ever you move from home or office. The normal procedure where we usually open the network connections and enter the IP address manually is painful if we do it daily. To get this done easily all you have to do is create two batch files which will ease our task.
How to create a batch file for changing network settings?
1. Open notepad.
2. Now copy the code that is given below
netsh interface ip set address name="Local Area Connection" source=static addr=192.168.1.100 mask=255.255.255.0
netsh interface ip set address name="Local Area Connection" gateway=192.168.1.1 gwmetric=0
netsh interface ip set dns name="Local Area Connection" source=static addr=18.104.22.168
netsh interface ip add dns name = "Local Area Connection" addr =22.214.171.124
The relevant IP’s are illustrated in the screenshot below, the IP’s that are illustrated are only examples:
3. Now that you have copied the code, paste this in the Notepad. Enter the IP’s as per your requirements and save the file with the extension *.bat
4. Your batch file is now ready for execution, now double click the batch file that you just created and you will find your network settings configured in a few seconds.
5. Create another batch file using the similar procedure, in this batch file you enter the IP’s that are relevant to your other location.
6. Now you should be having two batch files one for your office network and the other for your home network.
I guess by using this method your life would ease a bit. If you have better method then do let me know.
Did you enjoy this article? Please subscribe to RSS Feed to receive all the updates!
- No related posts found