Skip to content

Commit 6b2d698

Browse files
authored
upload
0 parents  commit 6b2d698

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

modifyRegistryAndRestart.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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

网络连接.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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
16 KB
Loading

0 commit comments

Comments
 (0)