马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
问题现象
Windows 10 能正常上网,但任务栏网络图标却显示"无法连接到 Internet"或未连接。这通常是因为系统的网络状态主动探测(NCSI)配置异常,导致系统误判网络状态。
手动修复脚本
新建一个文本文档,将后缀改为 .bat,以管理员身份右键运行。脚本会写入正确的 NCSI 探测配置并重启网卡:
@echo off
chcp 65001 >nul
:: 检查是否以管理员权限运行
net session >nul 2>&1
if %errorlevel% neq 0 (
echo 请以管理员权限运行此脚本。
pause >nul
exit /b
)
echo Windows Registry Editor Version 5.00 > temp.reg
echo. >> temp.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet] >> temp.reg
echo "ActiveWebProbeContent"="Microsoft NCSI" >> temp.reg
echo "ActiveWebProbeContentV6"="Microsoft NCSI" >> temp.reg
echo "ActiveWebProbeHost"="www.msftncsi.com" >> temp.reg
echo "ActiveWebProbeHostV6"="ipv6.msftncsi.com" >> temp.reg
echo "ActiveWebProbePath"="ncsi.txt" >> temp.reg
echo "ActiveWebProbePathV6"="ncsi.txt" >> temp.reg
echo "EnableActiveProbing"=dword:00000001 >> temp.reg
reg import temp.reg
del temp.reg
netsh interface set interface name="以太网" admin=disable
netsh interface set interface name="以太网" admin=enable
echo 完成!按任意键退出
pause >nul
注意事项
脚本中的网卡名称默认为"以太网",若你的网卡名称不同,请先通过 netsh interface show interface 查看实际名称并替换。社区也有开源脚本(如 GitHub 上的 Windows-Network-Icon-Fix 项目)可供参考,核心逻辑与此一致。
qidao123.com企服评测-应用市场 编辑提示:修改 NCSI 注册表键值会影响系统对网络状态的判断,仅在图标误报时修复,正常情况下无需改动。
|