Last active
December 21, 2015 17:18
-
-
Save hustlijian/6339084 to your computer and use it in GitHub Desktop.
this is a bat file used to setup WiFi hostednetwork, 自建wifi热点,使用脚本来设置、启动和关闭等。 来源:[随身WiFi](http://blog.idf.cn/archives/1400.html)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:begin | |
cls | |
@echo.※※※※※※※※※※※※※※※※※※※※※※※※※ | |
@echo off | |
echo. | |
echo.欢迎使用win7双网卡WiFi开关 | |
echo. | |
echo.※※※※※※※※※※※※※※※※※※※※※※※※※ | |
echo. | |
echo.开启WiFi请按1 | |
echo.关闭WiFi请按2 | |
echo.查看WiFi信息请按3 | |
echo.重新建立热点请按4 | |
echo.停止热点服务请按5 | |
echo.帮助请按6 | |
echo.取消请按7 | |
echo. | |
echo.本设置程序参考了众多网站设置方式。多谢各位的奉献。 | |
echo.版权没有,翻版不究。 | |
choice /C 1234567 >nul | |
cls | |
if errorlevel 7 goto end | |
if errorlevel 6 goto help | |
if errorlevel 5 goto disable | |
if errorlevel 4 goto setup | |
if errorlevel 3 goto imformation | |
if errorlevel 2 goto stop | |
if errorlevel 1 goto open | |
:help | |
echo.首次使用后,请将本地链接的Internet连接共享功能打开,不然建立出来的虚拟AP不能接入互联网。 | |
echo.其它问题,请上威锋网查询或查阅google。 | |
echo.原帖地址(此设置命令的来源):http://bbs.weiphone.com/read-htm-tid-1735140.html | |
goto end | |
:disable | |
echo. | |
netsh wlan set hostednetwork mode=disallow | |
echo. | |
goto end | |
:setup | |
echo. | |
netsh wlan set hostednetwork mode=allow ssid=323 key=19900626 | |
netsh wlan stop hostednetwork | |
netsh wlan start hostednetwork | |
echo. | |
goto end | |
:open | |
echo. | |
netsh wlan start hostednetwork | |
echo. | |
goto end | |
:stop | |
echo. | |
netsh wlan stop hostednetwork | |
echo. | |
goto end | |
:imformation | |
netsh wlan show hostednetwork | |
echo. | |
goto end | |
:end | |
echo. | |
echo.返回上一级? | |
choice | |
if errorlevel 2 goto end2 | |
if errorlevel 1 goto begin | |
:end2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment