Thursday, November 08, 2007

Error Installing ActiveX in IE

If an ActiveX component fails to install in IE, to find out the source of the problem, you just need to select IE menu: Tools > Internet Options, click "Settings" button in the "Browsing history" group, then click the "View files" button. There should be a file named like this: "?CodeDownloadErrorLog!name={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}". This is the error log that contains a bit more information to help find the source of installation failure. The above description is based on IE 7, you should be able to find similar options in other IE versions.

In my specific case, the error log looks like this:

*** Code Download Log entry (07 Nov 2007 @ 10:01:26) ***
Code Download Error: (hr = 800c0300) Unknown Error!!
Operation failed. Detailed Information:
...

...
LOG: Item mfc42.dll being processed.
ERR: INF Processing: Failed (800c0300) processing: mfc42.dll
. Cannot get primary/default language!LOG: URL Download Complete: hrStatus:0, hrOSB:800c0300, hrResponseHdr:0, URL:(*****.CAB)
LOG: Reporting Code Download Completion: (hr:800c0300 (FAILED), CLASSID: e45975a1..., szCODE:(*****.cab), MainType:(null), MainExt:(null))


Below is the related section in the .inf file:

[mfc42.dll]
FileVersion=6,2,4131,0
file=http://[Web Server]/libraries.cab
RegisterServer=no
DestDir=11


After I commented out the "FileVersion" parameter, the ActiveX component is installed successfully.

[mfc42.dll]
;FileVersion=6,2,4131,0
file=http://[Web Server]/libraries.cab
RegisterServer=no
DestDir=11

Since the problem only happens on Windows 2000 computers, and my development environment in Windows XP Pro. I suspect that the MFC42 library provided by me may not be compatible with Win2000. Or the MFC42 is already in use by Win2000, and Win2000 have difficulty upgrading to the newer version provided by me.

No comments: