Windows7 set wifi hotspot BAT script and sharing method to share

  

The wifi routers in the company are all set to the mac address limit. Many colleagues' positions are often moved in and out. They always have to set the mac address to bother me. I wrote a bat script to let them give Set up a wifi hotspot on your own computer, give them a test mobile phone to use the Internet, so I am also easy. System: Windows 7 required equipment: a notebook with a wifi network card (now there should be few notebooks without a wifi network card) Well, what you don't bring, okay, you can ignore this article) Environment: Notebook wired network card can access the Internet, wifi network card to set hotspots

1. Set bat script

wifi Set the contents of the .bat script:


Copy the code
The code is as follows: @echo offchoice /C 123 /M "Set wifi, please enter 1, open wifi, please enter 2, turn off wifi Please enter 3if errorlevel 3 goto offif errorlevel 2 goto onif errorlevel 1 goto install: installnetsh wlan set hostednetwork mode=allownetsh wlan set hostednetwork ssid=set to the wifi name you want key=set to the password you want netsh wlan start hostednetworkgoto end :onnetsh wlan start host Ednetworkgoto end:offnetsh wlan stop hostednetworkgoto end:endecho.&pause

ps: Pay attention to change the ssid to the wifi name you want, change the key to the password you want to set

2 Setting up Internet Connection Sharing

You are currently using a wired network connection. Generally, the default connection is "local connection", right click to select "local connection", select “properties”→“ Share & rdquo;, check "Allow other network users to connect through this computer's Internet connection", and then select "Virtual Connection 2" in the "Home Network Connection" to confirm the virtual network connection. Br>


ps: Of course, it is also possible that the virtual connection will be 3 or 4, and you can confirm this yourself and set it up. My laptop is virtualized with wireless connection 3. I also I don't know what's going on, anyway, I can share it as a hotspot.

3. Close the windows 7 firewall

How to close the windows 7 firewall, here is not to say, after all, it is It is very simple.

4.Verify

Look for a mobile phone or pad to connect The hotspot we just set up to see if you can get the ip and whether you can access the Internet.

If you can't access the Internet, you can go to the solution of this article:

Win7 comes with WIFI shared Internet access, connect After the last can only be on the QQ can not see the solution of the page

Well, windows 7 set wifi hotspot is here.

Copyright © Windows knowledge All Rights Reserved