@echo off
echo "---------------------------------------------------"
echo " 欢迎使用 请以管理员身份运行此文件 "
echo "---------------------------------------------------"
echo " 1.启用承载网络"
echo " 2.禁用承载网络"
echo " 3.显示信息"
echo " 4.刷新承载网络设置"
echo " 5.设置配置信息"
echo " 6.设置禁止承载网络"
echo " 7.删除承载网络设置"
echo " 8.退出脚本"
echo "---------------------------------------------------"
echo " author: young mail: bruceyoungfaded@gmail.com "
echo "---------------------------------------------------"
:begin
set /p s=请输入任务前面的数字,按enter确定:
if %s% equ 1 goto start
if %s% equ 2 goto stop
if %s% equ 3 goto show
if %s% equ 4 goto refresh
if %s% equ 5 goto setallow
if %s% equ 6 goto setdisallow
if %s% equ 7 goto deletenet
if %s% equ 8 goto exit
:start
netsh wlan start hostednetwork
goto begin
:stop
netsh wlan stop hostednetwork
goto begin
:show
netsh wlan show hostednetwork
goto begin
:refresh
netsh wlan refresh hostednetwork
goto begin
:setallow
netsh wlan set hostednetwork mode=allow ssid=young key=12345678
goto begin
:setdisallow
netsh wlan set hostednetwork mode=disallow ssid=young
goto begin
:deletenet
echo "net stop/start wlansvc"
echo "删除注册表 "HKLM:systemcurrentcontrolsetserviceswlansvcparametershostednetworksettings""
goto begin
:exit
cd .
感觉棒棒的 !!!