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. Additionally, if you try to open a Visio drawing in the Visio Viewer by using one of the following methods, you may also receive this script error message:
A mapped drive.
A universal naming convention (UNC) path.
A Web site.
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.
Note This problem may also occur if you are running Internet Explorer 6 in Windows Server 2003 Service Pack 2.
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.
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.
To work around this problem, use one of the following methods.
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
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.
Internet Explorer 7
If you encounter this problem when you are using Internet Explorer 7, 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:
Right-click FeatureControl, point to New, click Key, type FEATURE_LMZSCRIPTFAIL_IN_INTERNET, and then press ENTER.
Right-click FEATURE_LMZSCRIPTFAIL_IN_INTERNET, 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 5.
In the Value data box, type 0, and then click OK.
Exit Registry Editor.
Add the intranet site to the trusted zone.
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:
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.