zoukankan      html  css  js  c++  java
  • 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


  • 相关阅读:
    Using Redis as Django's session store and cache backend
    Celery 和 Redis 入门
    centos 安装 rabbitmq
    CentOS 6 安装 Python3.5以及配置Django
    python metaclass 入门简介
    uWSGI其三:uWSGI搭配Nginx使用
    CentOS 6.5 安装 Nginx 1.7.8 教程
    基于nginx和uWSGI在Ubuntu上部署Djan
    CentOS 6.5 下安装 Redis 2.8.7
    查看Selinux和关闭Selinux
  • 原文地址:https://www.cnblogs.com/arbboter/p/4225281.html
Copyright © 2011-2022 走看看