Created
July 11, 2013 16:21
-
-
Save imebeh/5976913 to your computer and use it in GitHub Desktop.
快速设置的承载网络
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
@echo off | |
:main | |
cls | |
echo. | |
echo. | |
echo ========= Windows 7 承载网络工具 ========= | |
echo v20120705 | |
echo. | |
echo 1. 创建承载网络 | |
echo 2. 启动承载网络 | |
echo. | |
echo 3. 查看已创建的承载网络 | |
echo. | |
echo 4. 停止承载网络 | |
echo 5. 删除承载网络 | |
echo. | |
echo 6. 退出 | |
echo. | |
set choice=3 | |
set /p choice=选择一个选项: | |
if "%choice%"=="1" goto creathn | |
if "%choice%"=="3" goto showhn | |
if "%choice%"=="2" goto starthn | |
if "%choice%"=="4" goto stophn | |
if "%choice%"=="5" goto disabledhn | |
if "%choice%"=="6" exit | |
goto main | |
:creathn | |
echo 输入SSID, 默认为Tower, 直接回车使用默认值 | |
set /p ssid=SSID: | |
echo 输入密码, 默认为1234567890-= , 直接回车使用默认值, 应为 8 到 63 个 ASCII 字符组成的字符串, 例如, 密码, 或 64 个十六进制的数字(代表 32 个二进制字节) | |
set /p key=密码: | |
if "%ssid%"=="" set ssid=Tower | |
if "%key%"=="" set key=1234567890-= | |
netsh wlan set hostednetwork mode=allow ssid="%ssid%" key="%key%" | |
pause | |
goto main | |
:showhn | |
netsh wlan show hostednetwork | |
pause | |
goto main | |
:starthn | |
netsh wlan start hostednetwork | |
pause | |
goto main | |
:stophn | |
netsh wlan stop hostednetwork | |
pause | |
goto main | |
:disabledhn | |
netsh wlan set hostednetwork mode=disallow | |
pause | |
goto main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment