System hacks: Quickly switch between wireless automatic connections more easily

As an employee of supermarket headquarters, Zhang often has to carry his laptop to each store to check his work. Many stores use static IP connection and hidden SSID to avoid the hotspot in the office being connected by unrelated people, so Zhang needs to set the network segment and hotspot name and enter the password to connect to Wi-Fi with his laptop every time, which is very inconvenient. So let’s take advantage of the tools that come with Windows 10 to solve a problem similar to Zhang’s.

Our solution is to set the IP of the current computer to be the same as the IP segment of the store’s route, and at the same time to achieve automatic connection to the store’s hidden SSID. the following describes how to solve these two problems.

●View store routing IP information

At any store (assume store 1), use your laptop to connect to the hidden network of that store, select “Hidden Network” in the SSID list, then enter the SSID name and connection password in turn, and the hidden SSID name will be displayed automatically after successful connection (Figure 1).

2020A-WIFI-(1)

Tip.

To set the hidden network, just go to the router (TPlink FC12 model for example) settings interface, switch to “Network Settings→Basic Settings”, then remove the check box before “Enable SSID broadcast”, save it and it will become After saving, it will become “Hidden Network”.

Expand “Control Panel→Network and Internet→Network and Sharing Center”, select the connected WiFi network, open the WLAN status display window, continue to click “Wireless Properties”, and in the opened window, check Check the “Connect automatically when this network is in range” and “Connect even if the network does not broadcast its name (SSID)” (Figure 2).

2020A-WIFI-(2)

Click “Details” in the WLAN 3 status window above. In the window that opens, we can see the IPv4 address, IPv4 mask and IPv4 default gateway information, which are the information needed to set up the static IP on your computer.

2020A-WIFI-(3)

● Export and import store SSID profiles

To enable the laptop to automatically connect to each store’s hidden SSID, we can use the “Export Import Store SSID Profile” to achieve this.

Start the command prompt as administrator, type “netsh wlan show profile” (use the netsh command to show the current interface profile), in the command window you can see the name of the current interface is “wlan 3 ” (this is the name of the current wireless NIC connection, if there are multiple NICs, be careful to choose the correct interface). The profile of the currently connected hidden SSID is “TP-LINK_FC12”, which is the same as the name of the currently connected SSID of the computer, which can be viewed by opening the Wi-Fi connection pane (Figure 4).

2020A-WIFI-(4)

After determining the name of the profile for the current connection SSID, proceed to export the profile by entering the following commands (press enter after entering each line of the command to confirm, rem is a comment and no input is required) (Figure 5).

2020A-WIFI-(5)

rem Locate the desktop directory via the CD command

cd C:Users current login account nameDesktop

rem Export SSID profile to current desktop key=clear means SSID connection password is exported in clear text

netsh wlan export profile key=clear

Once you have finished entering the commands, you will see the configuration file named “WLAN 3-TP-LINK_FC12.xml” on the current desktop. “to open it. The code in line 4 is the name of the configuration file, line 7 is the hexadecimal SSID name (you can open https://www.107000.com/T-Hex/进行转换), line 8 is the SSID name, and the penultimate line 9 “</keyMaterial>” is the SSID name. ” between the codes is then the SSID connection password. Therefore, we just need to export the above configuration file in one store and then change the configuration file in other stores with reference to the above format (e.g. just change the SSID name and password), and then we can realize automatic connection by importing this configuration file later (Figure 6).

2020A-WIFI-(6)

● Create a batch process to automatically switch IPs and connections

After completing the above operation, create a new folder “Store 1” on your desktop and copy the above exported “WLAN 3-TP-LINK_FC12.xml” to it (since I have a wired NIC and have connected to Since my computer has a wired NIC and is connected to multiple hotspots, I will export multiple configuration files, so I will just keep “WLAN 3-TP-LINK_FC12.xml” here). Next, download “1.cmd” from http://dwz.date/czra (extraction code: na67), and place it in the “Desktop Store 1” as shown in the figure (Figure 7). If you also need to create other stores connection configuration, the same as above in the desktop to create a new “store 2”, “store 3” …… and other folders, refer to “1 cmd” code format, create new 2.cmd, 3.cmd …… files and place them in the corresponding folders.

2020A-WIFI-(7)

In this way, when you arrive at the corresponding store, just open the corresponding folder, such as store 1, and run the file “C:userscurrent accountdesktopstore11.cmd” as an administrator to realize automatic connection. And so on, to other stores, you can run the .cmd file under the corresponding store folder (Figure 8).

2020A-WIFI-(8)

Tip.

If you are using DHCP to automatically assign IPs at home, you can add a cmd file with the following code to quickly restore the default settings after running.

netsh interface ip set address name=”wlan 3″ source=dhcp

netsh interface ip set dns “wlan 3” dhcp

Leave a Comment