

%LOCALAPPDATA%\Microsoft\Edge\User Data\Default\Preferences (以下为伪代码,可以前往下方下载批处理一键修改)
关闭EdgeVpn:[edge_vpn.available, edge_vpn.enabled_globally] = [false, false]; 关闭开发扩展弹窗:extensions.ui.dev_mode_warning_snooze_end_time = "9223372036854775807"
①关闭EdgeVpn
taskkill /F /IM msedge.exe
powershell -ExecutionPolicy Bypass -Command ^
"$filePath = Join-Path $env:LOCALAPPDATA 'Microsoft\Edge\User Data\Default\Preferences';" ^
"$json = Get-Content $filePath -Raw -Encoding UTF8 | ConvertFrom-Json;" ^
"if (-not $json.edge_vpn) { $json | Add-Member -MemberType NoteProperty -Name 'edge_vpn' -Value ([pscustomobject]@{ }) };" ^
"$json.edge_vpn.available = $false;" ^
"$json.edge_vpn.enabled_globally = $false;" ^
"$content = $json | ConvertTo-Json -Depth 99 -Compress;" ^
"$encoding = New-Object System.Text.UTF8Encoding($false);" ^
"[System.IO.File]::WriteAllBytes($filePath, $encoding.GetBytes($content));"
pause ②关闭开发扩展弹窗
taskkill /F /IM msedge.exe
powershell -ExecutionPolicy Bypass -Command ^
"$filePath = Join-Path $env:LOCALAPPDATA 'Microsoft\Edge\User Data\Default\Preferences';" ^
"$json = Get-Content $filePath -Raw -Encoding UTF8 | ConvertFrom-Json;" ^
"if (-not $json.extensions) { $json | Add-Member -MemberType NoteProperty -Name 'extensions' -Value ([pscustomobject]@{ }) };" ^
"if (-not $json.extensions.ui) { $json.extensions | Add-Member -MemberType NoteProperty -Name 'ui' -Value ([pscustomobject]@{ }) };" ^
"$json.extensions.ui.dev_mode_warning_snooze_end_time = '9223372036854775807';" ^
"$content = $json | ConvertTo-Json -Depth 99 -Compress;" ^
"$encoding = New-Object System.Text.UTF8Encoding($false);" ^
"[System.IO.File]::WriteAllBytes($filePath, $encoding.GetBytes($content));"
pause 关闭EdgeVpn:https://wwre.lanzouq.com/iA31h38bs1if
关闭开发扩展弹窗:https://wwre.lanzouq.com/isa4q38bro5e