Windows configuration A batch program that hosts the network

Source: Internet
Author: User

@rem This is the command for creating a hosted network in Windows
Title WiFi hotspot
@echo off

Set SSID=ABCDE
Set key=123456789

: Begin
Cls
Echo--------------------------------------------------------
echo Default ssid:%ssid% default key:%key%
Echo--------------------------------------------------------
echo 1. Configuration 2. Start 3. Stop 4. Disable 5. Status 0. exit
CHOICE/C 123450

if errorlevel 6 goto exit
if errorlevel 5 goto status
if errorlevel 4 goto Disallow
if errorlevel 3 goto stop
if errorlevel 2 goto start
if errorlevel 1 goto allow

: Allow
Netsh wlan set hostednetwork mode=allow ssid=%ssid% key=%key%
Goto END

: Start
Netsh wlan start hostednetwork
Goto END

: Stop
Netsh wlan stop hostednetwork
Goto END

:d Isallow
Netsh wlan set hostednetwork mode=disallow
Goto END

: status
Netsh wlan show hostednetwork
Goto END

: End
Pause
Goto BEGIN
: Exit
Pause

Windows configuration A batch program that hosts the network

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.