Skip navigation

JSI Tip 7710. How do I export the Internet Explorer 6.0 Sites settings for all security zones?

I have scripted Sites.bat to export the Sites settings from Internet Explorer's Tools / Internet Options / Security tab.

Sites.bat exports all the Security Zones for the current users (HKEY_CURRENT_USER) and local machine (HKEY_LOCAL_MACHINE), using REGEDIT4 format, so they can be imported to all platforms running Internet Explorer 6.0.

The syntax for using Sites.bat is:

Sites Folder

Where Folder is the directory that will contain the Sites_HKCU.reg and Sites_HKLM.reg registry files.

Sites.bat contains:

@echo off
setlocal
if \{%1\}==\{\} goto Syntax
set folder=%1#
set folder=%folder:\#=%
set folder=%folder:"=%
set folder=%folder:#=%
if not exist %folder%\*.* goto Syntax
if exist "%folder%\Sites_HKCU.reg" del /q "%folder%\Sites_HKCU.reg"
if exist "%folder%\Sites_HKLM.reg" del /q "%folder%\Sites_HKLM.reg"
regedit /a "%folder%\Sites_HKCU.reg" "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains"
regedit /a "%folder%\Sites_HKLM.reg" "HKEY_Local_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains"
exit /b 0
:Syntax
@echo Syntax: Sites Folder
endlocal
exit /b 1



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish