Microsoft KB Archive/934366

= Error message when you try to open an ActiveX control-based MIME handler in Windows Internet Explorer 7: &quot;Invalid character&quot; =

Article ID: 934366

Article Last Modified on 10/27/2007

-

APPLIES TO


 * Windows Internet Explorer 7

-



Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SYMPTOMS
When you try to open a Microsoft ActiveX control-based MIME handler in Windows Internet Explorer 7, you may receive the following script error message:

Line: 2

Char: 1

Error: Invalid character

Code: 0

Line: 1

Char: 1

Error: Object expected

Code: 0

For example, you may receive this script error message when you try to open a Macromedia Shockwave Flash (.swf) file or when you try to open an Audio Video Interleaved (.avi) file.

This problem occurs if the following conditions are true:
 * The file is located in the Internet Web zone or in the Intranet Web zone.
 * The Allow active content to run in files on My Computer check box is selected in Internet Explorer 7.

Note To locate this check box in Internet Explorer 7, click Internet Options on the Tools menu, and then click the Advanced tab. Under Security, you can see the Allow active content to run in files on My Computer check box.



CAUSE
This problem occurs because the  registry key prevents the execution of a script file in the local machine zone when the file is hosted in an Internet zone HTML page or an intranet zone HTML page.

The  registry key is a new security registry key that was added in Internet Explorer 7. When you open an ActiveX control-based MIME handler, Internet Explorer 7 creates a hidden HTML page that contains a reference to an external script. The script dynamically inserts the ActiveX control. Because of the  registry key, the script content is set to a buffer that contains only the 0x01 value. Additionally, the script is blocked.



WORKAROUND
To work around this problem, use one of the following methods.

Method 1
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

Let HTML pages access scripts on the local file system. Create a DWORD-type registry entry, and then set the value of the registry entry to 0. To do this, follow these steps:  Click Start, click Run, type Regedit in the Open box, and then click OK. Locate the following registry key, and then click the following registry key:

 On the Edit menu, point to New, and then click DWORD Value. In the DWORD Value box, type iexplore.exe, and then press ENTER. Double-click the iexplore.exe registry entry that you created in step 4. In the Value data box, type 0, and then click OK.</li> Exit Registry Editor.</li></ol>

Method 2
Add the intranet site to the trusted zone.

<div class="moreinformation_section">

MORE INFORMATION
The  registry key prevents the HTML pages that are located in the Internet Web zone or in the Intranet Web zone from accessing the script blocks. By default, this registry key does not exist in the registry. However, the feature is enabled.

For more information about the  registry key, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/ms649488.aspx

The Allow active content to run in files on My Computer check box is mapped to the following registry key:

For more information about the  registry key, visit the following MSDN Web site:

http://msdn2.microsoft.com/en-us/library/ms537641.aspx#lmz

<div class="moreinformation_section">

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.

Keywords: kberrmsg kbtshoot kbwebbrowser kbprb KB934366

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.