ActiveX Object.
Moderator: General Moderators
ActiveX Object.
Is there such a thing as an ActiveX object model in Internet Explorer? One that would allow me to edit a registry key, Start Page key to be specific?
Sorry for being a little brief. But I don't know what else to say.
Sorry for being a little brief. But I don't know what else to say.
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
Re: ActiveX Object.
Another reason why ActiveX should be banned from all browser usage.figaro11 wrote:Is there such a thing as an ActiveX object model in Internet Explorer? One that would allow me to edit a registry key, Start Page key to be specific?
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: ActiveX Object.
Any site that does that would be a site I'd never visit more than once (on purposefigaro11 wrote:One that would allow me to edit a registry key, Start Page key to be specific?
I heard somewhere that ActiveX allows you registry access, maybe with a confirmation from the user with a confirmation dialog box.
The reason I'd like to access the registry is to set IE7 homepage. I don't mind if the user would be prompt that this is happening because I would want him to know what is happening.
Doesn't that make sense?
Feyd says that he remembers that ActiveX can't talk with the registry. I've been googling and googling but I couldn't even find a documentation for an ActiveX object in JScript, does one even exist?! I even searched on MSDN, no luck. What's going on here?
The reason I'd like to access the registry is to set IE7 homepage. I don't mind if the user would be prompt that this is happening because I would want him to know what is happening.
Doesn't that make sense?
Feyd says that he remembers that ActiveX can't talk with the registry. I've been googling and googling but I couldn't even find a documentation for an ActiveX object in JScript, does one even exist?! I even searched on MSDN, no luck. What's going on here?
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
Just stay completely away from ActiveX. Most other browsers do not even support it. And not supported on other operating systems so using it is excluding quite a few people.
Fortunately, ActiveX is usually used only by obscure, rarely used sites or by hackers trying to gain access and information when you hit their site with IE.
Fortunately, ActiveX is usually used only by obscure, rarely used sites or by hackers trying to gain access and information when you hit their site with IE.
Okay, first let me clears some things up.
I know Safari doesn't allow the javascript protocol in a homepage, but they do in a bookmark and I haven't found any other solution for Safari.
Hopefully you understand. Is there a documentation of an IE specific object call ActiveX or something similar? I know that IE's HTTPRequest object is an ActiveX object, right?
EDIT: To create a new XMLHttpRequest object in IE:
So I researched the ActiveXObject and found this. All this tells me is that the ActiveXObect has two parameters, one optional and one not. The first is a string, but I don't know what string is expected. What string is expected?
Yes there is. IE7 can not add [javascript: alert("hello world");] as a homepage of any kind. IE6 does but not IE7. The only way to get [javascript: alert();] as a homepage is to edit it directly in the registry. The average PC user doesn't even know what a registry is, or a browser for that matter, so I can't just say "For all you IE7 users out there, edit the registry key Start Page.". So I was thinking of automating the "installation", if you will, of my homepage/bookmarklet.Feyd wrote: Let them decide whether they want to make the site their homepage on their own. There's no reason to do this for a user.
I know Safari doesn't allow the javascript protocol in a homepage, but they do in a bookmark and I haven't found any other solution for Safari.
Don't worry Panama Jack, this will be IE specific.AKA Panama Jack wrote:Just stay completely away from ActiveX. Most other browsers do not even support it. And not supported on other operating systems so using it is excluding quite a few people.
Hopefully you understand. Is there a documentation of an IE specific object call ActiveX or something similar? I know that IE's HTTPRequest object is an ActiveX object, right?
EDIT: To create a new XMLHttpRequest object in IE:
Code: Select all
var HttpRequest = new ActiveXObject("MSXML2.XMLHTTP.3.0");
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
Your absolutely right, alert is pointless. But I was using it as an example; I'm trying to prove a point. alert() is javascript, and it's the more simple function in javascript. So my point is, by writing [javascript: alert();] I'm saying just any old javascript where alert() is. Do you not not understand?AKA Panama Jack wrote:Really, that's a stumper. That is pretty darned useless.feyd wrote:What the heck does alert() have to do with setting a homepage?
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
It's quite useful in FireFox. For example I could write something like this:AKA Panama Jack wrote:Still pretty damned useless to put javascript into a homepage link in a browser. But I bet there are security reasons why most decent browsers prevent it.
Code: Select all
javascript:function loadScript(scriptURL) { var scriptElem = document.createElement('SCRIPT'); scriptElem.setAttribute('language', 'JavaScript'); scriptElem.setAttribute('src', scriptURL); document.body.appendChild(scriptElem);}loadScript('http://westciv.com/xray/thexray.js');But anyways we're getting off topic. My question: What's the first parameter for the ActiveXObject() constructor?
- stereofrog
- Forum Contributor
- Posts: 386
- Joined: Mon Dec 04, 2006 6:10 am
Hi,figaro11 wrote:I heard somewhere that ActiveX allows you registry access, maybe with a confirmation from the user with a confirmation dialog box.
The reason I'd like to access the registry is to set IE7 homepage. I don't mind if the user would be prompt that this is happening because I would want him to know what is happening.
there's no such thing as "ActiveX object model". ActiveX is just the name of the technology, each ActiveX component has its own set of objects and methods, depending on its purpose. For accessing the registry (and other system-level tasks) there is the built-in "Scripting shell" component, here's an example on how to use it:
Code: Select all
// init the component
var wsh = new ActiveXObject("WScript.Shell");
// use it to read a registry value
var value = wsh.RegRead("HKLM\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page");Of course, IE doesn't allow stuff like this by default, doing this only makes sense in a less secure environment (intranets etc).
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm