One of my friends has a laptop, which he uses at office and home, that has one network card. He has to manually change the settings of IP address and gateway etc when he moves from home to office network and office network to home network.
He asked me
How can I remember these settings and change them with click of mouse rather than doing it manually?
In this post, we are going to show you two ways of doing the same, one way is via a freeware utility NetSetMan, which is free for personal use, but if you want to use it commercially, we have another way, the geeky way of doing it with windows batch files.
NetSetMan Utility For Network Settings
First time you launch the utility, you need to set the network card using the refresh button and get the current settings for the first connection. See the snapshots below:
The below screen shot shows how to get the current network settings for IP Address, Subnet Mask, Default Gateway, DNS servers etc. from existing connection.
You can rename it at your convenience, for simplicity, you can name it in the name of office, home, college etc.
You can click on the other tabs, change the Network settings and you just need to press Activate button on right top of the window to activate the current tab’s settings.
when you go back home, just click on home tab and press activate! Its simple as that
You can download NetSetMan from here. Let us share the other way of doing it.
Using Windows Batch File to Change Network Settings (Geeky Way)
In this method we will use the netsh command provided by windows to change the network settings. Follow the stpes below:
1. Open Command prompt and type the following command to save the current network settings to a text file, lets name the file as homeNet.txt and save it to c drive of the computer. The command is “netsh -c interface dump > c:\homeNet.txt”
see the snapshot above
This file gets saved in c drive. This is a text file which saves the network settings for home network.
2. Now open the Network Connections and change the settings of Office settings.
After the settings changed as per office network, press OK to save.
3.On Command prompt type the following command to save the current network settings to a text file, lets name the file as officeNet.txt and save it to c drive of the computer. The command is “netsh -c interface dump > c:\officeNet.txt”
See the snapshot of the command above
This file saves your office network settings.
4. Now we will create Windows batch files to apply these saved settings on double click of the mouse. These will be two batch files, one for home, one for office. You can have more if you use more than two networks.
5. Open Notepad and type the following text
“netsh -f c:\homeNet.txt”
This is the command for applying the home network settings.
Saving the batch file is very important, because if you mistakenly save it as text file, it will not work at all. So go to file menu and choose save as option.
On Save as dialogue window, choose the location (I choose desktop for ease of changing settings), now choose file name as homeNet.bat and file type as All Files. Its very important to save it as All files, because it will otherwise save it as normal text file.
6. Now follow the same procedure in the previous step with the text as:
“netsh -f c:\officeNet.txt”
7. After this you can see these two batch files on the desktop. You just need to double-click on them to change the network settings!
Simple isn’t it? Please share your views and suggestions.
If you like this article or this article helped you, please clikc the +1 Button below to recommend this article.