How to add URL to the trusted zone in Internet Explorer?

后端 未结 7 888
北海茫月
北海茫月 2020-12-31 22:12

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.

Th

7条回答
  •  暖寄归人
    2020-12-31 22:37

    Here's a way to simplify the process.

    1. Create a .exe to ask for the domain (a textbox), specify the providers (as checkboxes: All, http, https, ftp) click "Add Site to Trusted Sites" to then do the following:
    2. Create a temp folder on C: as "C:\TempTS\"
    3. Create a .bat file ("C:\TempTS\AddTrustedSites.bat") similar to this:

    set regFile="C:\TempTS\AddTrustedSiteTS.reg"

    ECHO Windows Registry Editor Version 5.00 > %regFile%

    ECHO [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\MySecureDomain.com\www] >> %regFile

    ECHO "https"=dword:00000002 >> %regFile%

    regedit /s %regFile%

    DEL %regFile%

    The ECHO [HKEY_CURRENT_USER... and ECHO "https"... lines can be repeated for each provider checked. For the "ALL" provider, use an asterisk in place of "https", like such:

    ECHO [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\MySecureDomain.com\www] >> %regFile% ECHO "*"=dword:00000002 >> %regFile%

    Run the .bat file using this call:

    System.Diagnostics.Process.Start("C:\TempTS\AddTrustedSites.bat")

    After the .bat file is ran (takes mere microseconds), delete both the bat file and tempTS directory.

    MacSpudster

    (a.k.a. GNoter, TechStuffBC)

    =========================

    Credit where credit is due:

    regedit /s AddTrustedSite.reg

    the "/s" will supress confirm dialog boxes

    http://www.computerhope.com/registry.html

    also:

    see http://www.computing.net/answers/windows-xp/bat-file-to-add-trusted-site-in-ie/139995.html

提交回复
热议问题