File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ @ echo off
2+ chcp 65001 > nul
3+
4+ :: 检查是否以管理员权限运行
5+ net session > nul 2 >& 1
6+ if %errorlevel% neq 0 (
7+ echo 请以管理员权限运行此脚本。
8+ pause > nul
9+ exit /b
10+ )
11+
12+ echo Windows Registry Editor Version 5.00 > temp.reg
13+ echo . >> temp.reg
14+ echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet] >> temp.reg
15+ echo " ActiveWebProbeContent" =" Microsoft NCSI" >> temp.reg
16+ echo " ActiveWebProbeContentV6" =" Microsoft NCSI" >> temp.reg
17+ echo " ActiveWebProbeHost" =" www.msftncsi.comI" >> temp.reg
18+ echo " ActiveWebProbeHostV6" =" ipv6.msftncsi.com" >> temp.reg
19+ echo " ActiveWebProbePath" =" ncsi.txt" >> temp.reg
20+ echo " ActiveWebProbePathV6" =" ncsi.txt" >> temp.reg
21+ echo " EnableActiveProbing" =dword:00000001 >> temp.reg
22+
23+ reg import temp.reg
24+ del temp.reg
25+
26+ netsh interface set interface name = " 以太网" admin=disable
27+ if %errorlevel% neq 0 (
28+ echo 您需要手动禁用网卡并重启网卡。
29+ pause > nul
30+ exit /b
31+ )
32+
33+ netsh interface set interface name = " 以太网" admin=enable
34+
35+ echo 完成!按任意键退出
36+ pause > nul
Original file line number Diff line number Diff line change 1+ [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet]
2+ "ActiveWebProbeContent"="Microsoft NCSI"
3+ "ActiveWebProbeContentV6"="Microsoft NCSI"
4+ "ActiveWebProbeHost"="www.msftncsi.comI"
5+ "ActiveWebProbeHostV6"="ipv6.msftncsi.com"
6+ "ActiveWebProbePath"="ncsi.txt"
7+ "ActiveWebProbePathV6"="ncsi.txt"
8+ "EnableActiveProbing"=dword:00000001
You can’t perform that action at this time.
0 commit comments