笔记本开启wifi共享上网脚本

这几天回宿舍住,校园网不能连无线路由器,手机只能用笔记本共享wifi热点上网了。每次都要输入命令好麻烦,于是翻出大一的资料写了个bat脚本。wifi热点名字是bigbang,密码是abcd1234。名字和密码可以直接在脚本里改了再用。脚本要在win7下用管理员权限运行。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
echo off  

@title 笔记本开启wifi共享热点 --

@color fc

:start

echo 笔记本开启wifi --
echo 1.开启wifi共享热点

echo 2.关闭wifi共享热点

echo 3.查看已连接该无线网的用户数

echo 4.退出

set /p in=请选择操作序号:

if "%in%"=="1" GOTO open

if "%in%"=="2" GOTO stop

if "%in%"=="3" GOTO watch

if "%in%"=="4" GOTO quit

echo 请选择正确的序号!

GOTO start

:open

netsh wlan set hostednetwork mode=allow ssid=bigbang key=abcd1234

netsh wlan start hostednetwork

GOTO start

:stop

netsh wlan stop hostednetwork

GOTO start

:watch

netsh wlan show hostednetwork

GOTO start

:quit

exit

脚本下载: [wifi-bat.rar]

来发评论吧~
Powered By Valine
v1.5.2