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


  • 相关阅读:
    nginx 怎么通过域名访问8080端口(指定端口)
    node.js 部署的 vue 项目怎么在局域网访问
    MySQL的疑难问题解决
    win10下装ubuntu双系统(免U盘)
    文件、块、对象存储
    OpenShift定义的安全上下文约束(SCCs)
    OpenShift资源类型
    yum命令详解
    OCP3.9的网络
    NTP时间服务器搭建部署
  • 原文地址:https://www.cnblogs.com/arbboter/p/4225281.html
Copyright © 2011-2022 走看看