Hey,
How can you get the homepage (as set in IE and/or FireFox) of a users browser? Thanks a lot!
Get homepage
-
Killswitch
- Enthusiast

- Posts: 731
- Joined: Wed Apr 21, 2004 7:12 pm
Get homepage
~I see one problem with your reasoning: the fact is thats not a chicken~
Looks like FireFox stores values in the users profile directory in a file called "prefs.js". I see an entry there called "browser.startup.homepage" that points to my startup page.
My profile directory is "C:\Documents and Settings\Beach\Application Data\Mozilla\Firefox\Profiles\default.coz\"... YMMV
-Beach
My profile directory is "C:\Documents and Settings\Beach\Application Data\Mozilla\Firefox\Profiles\default.coz\"... YMMV
-Beach
To get internet explorer's home page use something like this:
Like Beach said Firefox doesn't seem to save anything into the registry but into your %appdata% folder instead. Look at the "prefs.js" file.
Code: Select all
;read a key from the registry
Procedure.s ReadRegKey(OpenKey.l, SubKey.s, ValueName.s)
hKey.l = 0
KeyValue.s = Space(255)
Datasize.l = 255
If RegOpenKeyEx_(OpenKey, SubKey, 0, #KEY_READ, @hKey)
KeyValue = "Error Opening Key"
Else
If RegQueryValueEx_(hKey, ValueName, 0, 0, @KeyValue, @Datasize)
KeyValue = "Error Reading Key"
Else
KeyValue = Left(KeyValue, Datasize - 1)
EndIf
RegCloseKey_(hKey)
EndIf
ProcedureReturn KeyValue
EndProcedure
Debug ReadRegKey(#HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\Main", "Start Page")

