Codebase setting for COM callable wrapper - Advanced Installer Community
Ian Hinson
Posts: 3
Joined: Tue Jun 24, 2008 11:32 pm

Codebase setting for COM callable wrapper

One of the files I deploy to the application directory is a COM DLL written in .NET (ie. "COM Callable Wrapper") which is used by my main (Win32) EXE program.
It's pretty cool that Advanced Installer recognises what this DLL is, and provides an option that says "Register .NET assembly for COM Interoperability".

But, on a target machine to which the MSI is deployed, the following registry keys appear under
HKEY_CLASSES_ROOT\CLSID\{29C2A74..guid.etc}\InprocServer32
  • Assembly | REG_SZ | PaymtExch, Version=1.0.0.0, Culture=neutral, PublicKeyToken=349ab0016287a4bf
    Class | REG_SZ | PaymentExchangeIntf.TPaymentExchange
    CodeBase | REG_SZ | file:///C:\/Program Files/Borland/Delphi7/Projects/<ProjectName>/PaymtExch.DLL
    RuntimeVersion | REG_SZ | v1.1.4322
    Threading Model | REG_SZ | Both
The problem is that the CodeBase setting is completely wrong for the target computer.
The path shown has been directly "borrowed" from the development computer, which is also the MSI packaging computer.
This path does not even exist on the target computer.

My understanding is that the CodeBase key (if present at all) should always give the path of the COM DLL which AI could easily pick up as the folder that the DLL is deployed into.

I think that AI must be grabbing all the registry keys verbatim, and just transcribing them across onto the target computer.
Most likely, if I'd never set a CodeBase key on the development computer, no CodeBase key would've appeared on the target computer.

Fortunately, because I am deploying the DLL into the application directory, it is found in that location at load time, and the CodeBase setting has no negative effect.
However, if I was deploying it for an Office application where the executable (eg. msaccess.exe) is in a different folder to the document being run (eg. Customers.mdb) then the CodeBase becomes important.
But in all cases, ie even when the CodeBase key is technically not needed, having the CodeBase key show the correct path to the DLL is unlikely to do any harm.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Codebase setting for COM callable wrapper

Hello Ian,

I'm not sure why this happens. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”