@echo off chcp 65001 >nul title Edge IE 模式配置脚本 echo ======================================================== echo Edge 浏览器自动 IE 模式配置脚本(整个 WebManage 目录) echo 目标路径: http://10.10.124.200/WebManage echo 必须以管理员身份运行 echo ======================================================== echo. REM ---- 检查管理员权限 ---- net session >nul 2>&1 if %errorlevel% neq 0 ( echo [错误] 请右键点击脚本,选择"以管理员身份运行"! pause exit /b 1 ) echo 开始配置 Edge 浏览器 IE 模式... REM ---- 1. 创建存放目录 ---- if not exist "C:\IEList" ( mkdir "C:\IEList" echo 已创建目录: C:\IEList ) REM ---- 2. 生成 site-list.xml ---- ( echo ^ echo ^ echo ^ echo ^IE11^ echo ^IE11^ echo ^ echo ^ ) > "C:\IEList\site-list.xml" echo 已生成站点列表文件: C:\IEList\site-list.xml REM ---- 3. 配置注册表策略 ---- reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v InternetExplorerIntegrationLevel /t REG_DWORD /d 1 /f >nul reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v InternetExplorerIntegrationSiteList /t REG_SZ /d "C:\IEList\site-list.xml" /f >nul echo 已配置 Edge 注册表策略 REM ---- 4. 刷新组策略 ---- echo 正在刷新组策略... gpupdate /force >nul echo 组策略刷新完成! echo. echo ======================================================== echo 配置全部完成! echo ======================================================== echo 请【完全关闭并重新启动 Microsoft Edge 浏览器】 echo (确保任务管理器中无 msedge 进程), echo 然后访问 http://10.10.124.200/WebManage/Logon.aspx 验证。 echo. echo 验证方法:在 Edge 地址栏输入 edge://compat/enterprise echo ======================================================== echo. pause