Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just wrote a bat script file which add trusted site for ie. In my bat script, I add a entry to this location:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains

it does't work, but I can see my site was added in the ie security option panel.

and I also note that, when you add trusted site in ie, a registry entry will be added to :


I don't know why, any one know the right way to add trusted site using bat script ? here is my code:

@Echo off&title gworks
set "a=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\"
set b=
reg add "%a%%b%" /v http /t REG_DWORD /d 2 /f >nul 2>nul
reg add "%a%%b%" /v https /t REG_DWORD /d 2 /f >nul 2>nul

after I execute it as administrator: enter image description here

share|improve this question
What version of Windows and IE? – CharlieRB Jan 9 '14 at 15:17
@CharlieRB I run it on windows 7 with IE 8 – Many Dollars Jan 9 '14 at 15:22
up vote 2 down vote accepted

Here is a TechNet posting which might help you.

DISCLAIMER: Use at your own risk. It is advisable to make backups before proceeding.

Adding trusted Sites for all users

The answer marked as correct states:

Try to add these four keys.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\\pacs] "https"=dword:00000002

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains\]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains\\pacs] "https"=dword:00000002

share|improve this answer
This does not seem to work with Internet Explorer 11 on Windows 8.1. – Dai Oct 5 '14 at 23:33
That's because this answer is for Windows 7. – CharlieRB Oct 6 '14 at 11:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.