Change IE9 Settings Using Batch Script and Registry Key

Just sharing some hacks I used for a logon script that I created for Internet explorer. Most of the hacks were using registry key, which is pretty simple as long as you know where the keys are.

Change Home Page

To set the home page for IE can’t be easier. For example setting as home page you do this:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain]
"Start Page"=""

Change Search Provider


There are two parts to this one, first is adding Google as a search provider option, second is making Google the default search provider.

Each search provider installed has a unique search scope identifier, for example, the one for google is {523578E1-643D-43BB-8840-A021BF2B23AB}.

In this example I am adding google as a search provider option and making it default search provider.

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerSearchScopes{523578E1-643D-43BB-8840-A021BF2B23AB}]
"FaviconPath"="C:\Users\oliang\AppData\LocalLow\Microsoft\Internet Explorer\Services\search_{523578E1-643D-43BB-8840-A021BF2B23AB}.ico"

[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerSearchScopes]

Internet Security Settings for the Four Zones


The Registry Key for this is located in

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones

There are 0, 1, 2, 3, 4 sub folders within this folder. Each Folder keeps different settings for different zones:

  • 0 – Computer
  • 1 – Local Intranet
  • 2 – Trusted Site
  • 3 – Internet
  • 4 – Restricted Sites

Easiest thing to do is setup whatever settings you need, and export the corresponding zone folder. To load the settings for that zone you just need to run that registry key file. Easy!

To add a website / domain to a particular zone, like “Trustted Site Zone”, you add the URL / domain to the zones first, then export this registry key.

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMap

For example to add as Trusted Site

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapDomains]

Turn On / Off Tool Bar, Favorites Bar, Status Bar


This one is even easier, they are all in the same registry folder, this is the key values for turnning them all on:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMINIE]

ShowStatusBar is status bar obviously, LinkBandEnabled is the favorites bar, and AlwaysShowMenus is the toolbar. To turn them off, change values to 0.

Running Registry Key Files In Batch Script

You can run a registry key file using this command:

regedit -s \

4 thoughts on “Change IE9 Settings Using Batch Script and Registry Key

  1. saraswathi

    Hi Oscar,
    Thanks for giving me the solution to change internet settings. but am not getting clarity my requirement i want to enable JavaScript in ie10 how to achieve this task my using registry key plz give me the solution

  2. Michael Carlisle

    I would like to know how to change the registry settings to batch change the security settings. I want to change the Trusted Sites and Intranet to a custom level; where the user authentication is set to use current user name and password. Can you help me with this?

  3. Hugo

    Hi Oscar,

    Good post. I am looking at writing a batch file to add a intranet site and then set it as the default provider. Your post is very useful.

    I just wondered, If you are adding Google as a search provider option using this script then how did you know the search identifier was {523578E1-643D-43BB-8840-A021BF2B23AB} in the registry before you added it?



Leave a Reply

Your email address will not be published. Required fields are marked *

For prompt technical support, please use our forum I check blog comments weekly.