How to add URL to the trusted zone in Internet Exp

2019-02-07 02:31发布

How can I add an URL to the trusted site? It seems that there are stored in the registry, but where exactly?
The hints I've googled so far weren't helpfull.

The .net programm will run locally on each client.

Edit clarification: I want to do this programmaticly running C# code.

7条回答
劫难
2楼-- · 2019-02-07 03:27

Powershell

#Setting IExplorer settings
Write-Verbose "Now configuring IE"
#Add http://website.com as a trusted Site/Domain
#Navigate to the domains folder in the registry
set-location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
set-location ZoneMap\Domains

#Create a new folder with the website name
new-item website/ -Force
set-location website/
new-itemproperty . -Name * -Value 2 -Type DWORD -Force
new-itemproperty . -Name http -Value 2 -Type DWORD -Force
new-itemproperty . -Name https -Value 2 -Type DWORD -Force
查看更多
登录 后发表回答