I was running a COM object from somewhere (in this case it was a VBScript in Excel) and getting the error, "Automation error: the system cannot find the file specified."
The VBScript snippet was like this:
The VBScript snippet was like this:
Dim obj As Object
Set obj = CreateObject("Example.ComObject") ' <<< This line gave the exception.
This showe me that, when trying to find a COM object, Windows looks in the registry in the HKCU hive first, then HKCR, looking at these entries:
- HKCU\Software\Classes\Example.ComObject - none found in my circumstance.
- HKCR\ExampleComObject\CLSID - contains the <CLSID>, e.g. {7D82...F}.
- HKCR\CLSID\<CLSID>\InprocServer32\CodeBase - contains the path to the DLL (see screen shot below).
No comments:
Post a Comment