How to check and set Default Home Page URL using a script

The following knowledgebase will explain the methods you can use to check the Default Home Page URL on local and remote computer.

To check on a local computer:

You can use the following methods:

  1. Connecting to Remote Registry Service
  2. Using a script

The first method is easy but includes a lot of efforts. You can navigate to the following location in registry after connecting to remote registry:

HKLM\Software\Microsoft\Internet Explorer\Main

The above registry includes the following values in right pane:

Default_Page_URL REG_SZ http://portal.csc.com/\

To check on a Remote Computer:

You can use the below script to check the Default Home Page URL on a remote computer:

@echo off

Srvlist=C:\Temp\Srvlist.txt

Echo Computer Name, Default Home Page >> Result.csv

SET Default_URL=

For /F “Tokens=*” %%a In (%srvlist%) Do (

Set Comp_name=%%a

Set RegQry=”\\%%a\HKLM\Software\Microsoft\Internet Explorer\Main” /v Default_Page_URL

REG.exe Query %RegQry% > CheckCC.txt

Find /i “Default_Page_URL” < CheckCC.txt > StringCheck.txt

FOR /f “Tokens=3” %%b in (CheckCC.txt) DO SET Default_URL=%%b

Echo %Comp_name, %Default_URL% >> Result.csv

)

The above script will check remote computer for one registry entry for checking Default Home Page URL and the results will be saved in a CSV format file.

Leave a Reply

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


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>