Edge 将有关默认主页的信息存储在哪里?

Edge 将有关默认主页的信息存储在哪里?

Edge 将有关默认主页的信息存储在哪里?在哪个注册表或文件中?

答案1

在注册表编辑器中,转到:

Computer\HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Edge\RestoreOnStartupURLs

您可以使用下一个 Power Shell 脚本读取该值

$EdgeHome = 'HKCU:\Software\Policies\Microsoft\Edge'
$EdgeSUURL = "$EdgeHome\RestoreOnStartupURLs"
Get-ItemProperty -Path $EdgeSUURL -Name '1'

您可以使用此 Power Shell 脚本来更改它:

# Ensure Edge key exists
$EdgeHome = 'HKCU:\Software\Policies\Microsoft\Edge'
If ( -Not (Test-Path $EdgeHome)) {
  New-Item -Path $EdgeHome | Out-Null
}
# Set RestoreOnStartup value entry
$IPHT = @{
  Path   = $EdgeHome
  Name   = 'RestoreOnStartup'
  Value  = 4
  Type   = 'DWORD'
}
Set-ItemProperty @IPHT -verbose
# Create Startup URL's registry key
$EdgeSUURL = "$EdgeHome\RestoreOnStartupURLs"
If ( -Not (Test-Path $EdgeSUURL)) {
  New-Item -Path $EdgeSUURL | Out-Null
}
# Create a single URL startup page
$HOMEURL = 'https://duckduckgo.com'
Set-ItemProperty -Path $EdgeSUURL -Name '1' -Value $HomeURL

阅读更多原始资料:https://devblogs.microsoft.com/powershell-community/how-to-change-the-start-page-for-the-edge-browser/

相关内容