Real-Time Security & PC Management Software
Contacts
This page in Spanish
 
This page in German
 
This page in Russian
 

  
Network
Changing Network Settings Automatically

 
 

 Changing Network Settings Automatically
 Configuring TP-Link router for Wake-On-LAN
Changing Network Settings Automatically
 Home  Knowledge base  Network

It's not uncommon in today's "connected" world where you find yourself using the same laptop to connect to a number of different networks, typically at home and at work. Sometimes you have to manually change network setting for a network connection.

Here's a way to automate changes to network settings.

There is a way to automate this process to just a single click, all you need to do is create four text files as in example below.

This is a configuration file for use with netsh.exe that will switch all necessary network settings that call for a simple batch file. You can add a shortcut to the desktop so you can run it with just a single click, switching network easily.

"Local Area Connection" is a name of network local connection as displayed in Windows folder, it can have another name and should be replaced appropriately in the scripts below. All IPs are just examples, of course.

Files:

Set_Network_Home.bat

      
      netsh -f home.sh

Home.sh

      
      # -----------------------------------------
      # Setting up IP-interfaces
      # -----------------------------------------
      pushd interface ip
      
      # IP interface for "Local Area Connection"
      
      set address name="Local Area Connection" source=static addr=10.10.1.12 mask=255.255.255.0
      set address name="Local Area Connection" gateway=10.10.1.10 gwmetric=0
      set dns name="Local Area Connection" source=static addr=10.10.1.10 register=PRIMARY
      set wins name="Local Area Connection" source=static addr=10.10.1.10
      
      popd
      # end

Set_Network_Work.bat

      
      netsh -f work.sh

Work.sh

      
      # -----------------------------------------
      # Setting up IP-interfaces
      # -----------------------------------------
      pushd interface ip
      
      # IP interface for "Local Area Connection"
      
      set address name="Local Area Connection" source=static addr=10.7.10.81 mask=255.255.255.0
      set address name="Local Area Connection" gateway=10.7.10.254 gwmetric=0
      set dns name="Local Area Connection" source=static addr=10.7.1.2 register=PRIMARY
      set wins name="Local Area Connection" source=static addr=10.7.1.11
      
      popd
      # end




© 2006-2017 RTSECURITY.COM. All rights reserved. Contacts