Click here to Skip to main content
13,248,295 members (43,850 online)
Click here to Skip to main content
Add your own
alternative version


8 bookmarked
Posted 31 Aug 2007

How to change the home page of Internet Explorer using a script

, 31 Aug 2007
Rate this:
Please Sign up or sign in to vote.
Shows you how to change the home page of Internet Explorer using a script.


This article explains how to change the home page of Internet Explorer using a script.

Using the code

The start page of Internet Explorer is saved in the Registry. If you open the Windows Registry Editor (Go to Start->Run, type regedit) and navigate to this following key location, you will see your current start page for IE:

My Computer->HKEY-CURRENT_USER->Software->Microsoft->InternetExplore->Main&-gt;Start Page

By changing this manually, you can set a different home page.

Following code shows you how to do it using VBScript

Define two objects to store the Shell object.

Dim objShell, RegLocate

Set objShell to a new "WScript.Shell" object.

Set objShell = WScript.CreateObject("WScript.Shell")

If an error occurs, resume the next instruction:

On Error Resume Next

This is the Registry path to the home page of IE:

RegLocate = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\StartPage"
objShell.RegWrite RegLocate,"","REG_SZ"

Show the finished message and quit:

WScript.Echo "Done"
WScript.Quit ' Quit the script 

Full source

'Change home page of ie
'Author : Thilina Hasantha (

Dim objShell, RegLocate
Set objShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next
'This is the registry path to home page of ie
RegLocate = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\Start Page"
objShell.RegWrite RegLocate,"","REG_SZ"
WScript.Echo "Done"
WScript.Quit ' Quit the script

Points of interest

Be careful when playing with the Windows Registry.


  • Posted on 08/31/2007.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Thilina Hasantha
Web Developer
Sri Lanka Sri Lanka
No Biography provided

You may also be interested in...


Comments and Discussions

GeneralStill simpler ... Pin
Vasudevan Deepak Kumar31-Aug-07 8:22
memberVasudevan Deepak Kumar31-Aug-07 8:22 
GeneralRe: Still simpler ... Pin
Thilina Hasantha31-Aug-07 9:30
memberThilina Hasantha31-Aug-07 9:30 
GeneralRe: Still simpler ... Pin
Blair C. Bonnett4-Sep-07 19:43
memberBlair C. Bonnett4-Sep-07 19:43 
That's usually a good idea. If a website changed my browser settings without asking me first, I wouldn't visit it again.


General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171114.1 | Last Updated 31 Aug 2007
Article Copyright 2007 by Thilina Hasantha
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid