win7无线网共享批处理

@echo off
echo 请确认你是以管理员的方式运行本程序的
:start
pause
cls
echo                *********************************************
echo                *                wifi control               *
echo                *        0    start wif                     *
echo                *        1    creat wif                     *
echo                *        2    stop wifi                     *
echo                *        3    show information              *
echo                *        4    exit                          *
echo                *********************************************
set /p iit= please input your choice:
if "%iit%" equ "1" (
     netsh wlan set hostednetwork mode=allow ssid=IT05 key=12345678 //注意这里自己设置ssid和key,key的位数有要求的,至少8位
     if %errorlevel% neq 0 (
             echo failed!
             goto end
     )
     echo please ensure your network is sharing ! //设置你的网,需要它共享到你新建的无限虚拟网
     echo if so, press any key to continue !
     echo else please go and set it and then come back here to go on !
     pause
     netsh wlan start hostednetwork
     if %errorlevel% neq 0 (
             echo failed!
             goto end
     )
     echo success start !
     )
if "%iit%" equ "0"  (
     netsh wlan start hostednetwork
     if %errorlevel% neq 0 (
             echo failed to start wifi !
             goto end
      )
      )
if "%iit%" equ "2"  (
     netsh wlan set hostednetwork mode=disallow
      if %errorlevel% neq 0 (
             echo failed!
             goto end
     )
     netsh wlan stop hostednetwork
      if %errorlevel% neq 0 (
             echo failed!
             goto end
     )
     echo success stop !
     )
if "%iit%" equ "3" (
     netsh wlan show hostednetwork
      if %errorlevel% neq 0 (
             echo failed!
             goto end
     )
     )
if "%iit%" lss "4" goto start
if "%iit%" gtr "4" goto start
:end
echo . > nul


转载于:https://www.cnblogs.com/arbboter/archive/2011/09/09/4225281.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值