Change Network Settings Of Laptop With Click Of Mouse

by Abhishek Bhatnagar on October 2, 2008

Advertisement

Trouble:

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?

network-connection-settings

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.

Fix:

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:

netsetman-first-screen

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.

get-the-current-settings

You can rename it at your convenience, for simplicity, you can name it in the name of office, home, college etc.

rename-network-settings

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 :)

create-office-profile-and-enter-settings

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”

save-network-settings

see the snapshot above

save-home-network-settings

Advertisement

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.

change-network-settings-to-office

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”

save-office-settings

See the snapshot of the command above

office-network-settings-saved

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.

create-batch-file

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.

save-as-a-batch-file

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.

saving-the-batch-file

6. Now follow the same procedure in the previous step with the text as:

“netsh -f c:\officeNet.txt”

batch-file-for-office-settings

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!

batch-files-created

Simple isn’t it? Please share your views and suggestions.

If you like this article or this article helped you, you can +1 to recommend this article on google plus.

You can follow us on Twitter or join our Facebook Fan Page. If you have a question to ask us, submit your question at Answers By Trouble Fixers.

Looking for something else? Search here :

{ 8 comments… read them below or add one }

Dhirendra October 6, 2008 at 2:04 am

hi friend

thanks to all of u

i am daily user of this web site.

nice blog from ur side to solved my problem in my company.

carry on and best of luck

Ryan G October 8, 2008 at 1:37 pm

Cheers for this. Very handy info for changing settings on-the-hop.

Game Economy October 9, 2008 at 12:54 am

Man o man, this sounds like a boatload of work for one simple change. Your automation process is guaranteed to save a whole lotta time and frustration. Nice work! :)

Dass December 4, 2008 at 7:42 am

Hi,

This is the first time i am visiting your website. it is very much useful for me. Tnks a loooooot. Keep going! All the Best. Add more network related articles along with the system related article. That would be helpful for Network Engineers like me.

Sarfaraj Khan April 18, 2009 at 12:54 am

When I used this method, on that time I become so glade,so glade that I can not explain in word. This website is very useful for anyone. I love very much to this site. The merit of this site is , this site provide solution without any charges. So, anybody can use this site.

shfflos February 26, 2010 at 2:31 pm

Thanks!! Very useful!!!

Leave a Comment

Previous post:

Next post:

© TroubleFixers – All about fixing computer troubles2007-2014 . All Rights Reserved.