PDA

View Full Version : How to set browsers start page?


Unregistered123
23rd January 2006, 11:12
I want to add checkbox called "Set http://google.com as my homepage" which, if checked, must set users default browsers start page to google.com.

Is it possible? If it`s, how?

Thanks.

Comm@nder21
23rd January 2006, 13:25
yep.

add a custom page with a checkbox. (-> see installoptions readme)

while installing read the state of the checkbox and call WriteRegStr .... if its checked.

use your homepage for the right regkey :)

Unregistered123
23rd January 2006, 17:01
And which regkey it is? For Firefox too? I think firefox uses own profile in in user settings directory.

Comm@nder21
23rd January 2006, 18:40
i think firefox uses the same regkey as ie by default.

as i sai:
for the right key you should search the internet :)

Afrow UK
23rd January 2006, 21:11
For Internet Explorer:
HKCU / HKLM "Software\Microsoft\Internet Explorer\Main" "Start Page"

Firefox does not store the home page in the registry because it has different profiles under $APPDATA\Mozilla\Firefox\Profiles\[profile name]
The file you need to read from is prefs.js, and the line:
user_pref("browser.startup.homepage", .... );

To get the default profile you need to read $APPDATA\Mozilla\Firefox\profiles.ini. You'll have to loop through each [Profile#] until Default=1 and you'll have your profile name from Path=...

If you want me to put this into a function (sounds like a good idea too) or if you'd like to make it, then get it up on the Wiki.

-Stu

animedown
17th March 2007, 14:29
sorry to bump this old thread, but I was wondering what is the code for changing firefox homepage? I understood how to implement the internet explorer one by changing the registry key, but not the mozilla firefox.
Whats the code? The wiki page is down at the moment for me, so I can't access it.

Anders
17th March 2007, 15:53
Don't forget about Opera, and possibly K-Meleon and Maxthon

is99
25th June 2007, 15:10
I know this is an old topic, but anyway I belive its stil very relavant.

Does anyone did a function thats ets Firefox home page like "Afrow UK" told to do ? If yes can you post it here or at NSIS wiki ?

Thanks.

bitwise
29th July 2007, 05:45
The registry entry above seems to work fine for IE 6, but it's not working on IE 7.

Anyone have code to include in the installer to set the home page for IE 7?

Thanks!!

orion_pt
9th February 2010, 02:26
Hi, I'd like to be able to get this feature to work with IE and Firefox and combine it with all the software packages I produce.
Can someone give me some info on how this can be accomplished?

Thx!