PRB: Cannot Call GetObject from Script in IE to Access Running Object

Article translations Article translations
Article ID: 239470
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

Symptoms

The GetObject function does not work when it is called from Microsoft Internet Explorer (IE) script.

Cause

You cannot use the GetObject function provided by VBScript and JScript when running scripts embedded within an HTML page. Internet Explorer disallows the use of this call because of security reasons.

Status

This behavior is by design.

More information

Calling GetObject to get a running ActiveX object on a client system would be a large security risk because any running object on the system could be accessed without direct user permission, and is therefore not allowed by Internet Explorer. There is no way to change this behavior, either through code or manually by an end user.

Web developers should be aware of a similar security issue when trying to access the object model of an ActiveX Document hosted in a frame from script in another frame. Access to an embedded ActiveX Document object is restricted because the document object server may support features that can be used to circumvent Internet Explorer security.

Developers who need to programmatically manipulate embedded ActiveX Documents may do so by building an ActiveX control that hosts the ActiveX Document and providing methods or properties to get to the object model. Because the control must be downloaded and installed by the end user as a trusted component, this solution does not violate IE security.

References

For additional information about security in Internet Explorer, click the article numbers below to view the articles in the Microsoft Knowledge Base:
195826 PRB: CreateObject Fails from Client-Side Scripts
167796 PRB: Permission Denied Error Message When Scripting Across Frames

Properties

Article ID: 239470 - Last Review: June 19, 2014 - Revision: 5.0
Keywords: 
kbnosurvey kbarchive kbactivedocs kbcontainer kbieobj kbprb kbwebbrowser KB239470

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com