Set IE default home page from a script

Once and a while we visit local customers. It is a great way to see our software working in the real world, and find out what we can do to make our products better. Many times I will be asked to solve an issue (That has nothing to do with our software)

This week while visiting a customer I was asked if there was a simple way to create a batch file (No VB Script) that would reset the default home page of IE 6. For various reasons they could not use Active Directory, nor could they use VB Script.

I started to play around with the command line options of regedit, and discovered it was not going to work. After some research I came across the reg.exe command. It seems like it is built into XP, 2003, and Vista. It is perfect for what I needed.

It allows you to modify/delete keys from the command line. Here is what I came up with:

Update IE Home Page

I saved it as UpdateIE.bat. Now I can simply call it like this:

UpdateIE “http://www.intelliadmin.com”

It updates the local users IE home page, and very easy to add to a login script

(Below is the script source so you can copy and paste it)

@echo off
set key=HKCU\Software\Microsoft\Internet Explorer\Main
set value=Start page
set data=%1
reg.exe add “%key%” /v “%value%” /d “%data%” /f

Filed Under: Windows

Leave a Reply