COM seems not to be registered

Add-in Express™ Support Service
That's what is more important than anything else

COM seems not to be registered
 
ewessely




Posts: 35
Joined: 2019-01-31
Hello Andrei,

many thanks for your reply.

As said in my initial post, I've a per User Addin.


Following your suggestions brings up an error during installation (translated from German):
"The typelibrary for file ....comAdInWithEvents.tlb cannot be registerd. Call your support." (which I'm doing herewith ;-)


Any further hints?

Best regards
Erich
ew
Posted 12 Nov, 2019 10:09:59 Top
Andrei Smolin


Add-in Express team


Posts: 17361
Joined: 2006-05-11
Hello Erich,

You can retrieve the registry info from the .TLB (using HEAT.exe; it is installed with WiX) and use that info to re-create the keys on the target machine.

c:heat.exe file ComAddinWithEvents.tlb -ag -svb6 -out tlb.wxs

The command line above creates this tlb.wxs:

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
        <DirectoryRef Id="TARGETDIR">
            <Directory Id="dir39B22699688E51DCD8DCBB99A47E835B" Name="Debug" />
        </DirectoryRef>
    </Fragment>
    <Fragment>
        <DirectoryRef Id="dir39B22699688E51DCD8DCBB99A47E835B">
            <Component Id="cmpAB7A7F4B409D2099F4531940FA79E59D" Guid="*">
                <File Id="fil842A9D5625DA1999F7300D49B5E4C6CD" KeyPath="yes" Source="SourceDirDebugComAddinWithEvents.tlb">
                    <TypeLib Id="{6F28778F-1A45-36B4-8EA3-EA43DA4916C1}" Description="ComAddinWithEvents" HelpDirectory="dir39B22699688E51DCD8DCBB99A47E835B" Language="0" MajorVersion="1" MinorVersion="0">
                        <Interface Id="{0FB8F0F4-B6E1-32B3-A6DD-C90EF3E8873D}" Name="_ADXExcelTaskPane1" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                        <Interface Id="{39BD9FE1-4A33-3AFC-815C-95FFA6CBA8F7}" Name="_XLLModule1" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                        <Interface Id="{9D5DA990-6E49-371B-B17A-C91FE8C60350}" Name="IAddInUtilities" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                        <Interface Id="{CBEEFAEA-BC94-35C6-89E1-7F7B3F4CC91B}" Name="IAddInEvents" ProxyStubClassId32="{00020420-0000-0000-C000-000000000046}" />
                        <Interface Id="{D06C3890-4CA6-3D41-A2C0-721948B4921C}" Name="_AddinModule" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                    </TypeLib>
                </File>
            </Component>
        </DirectoryRef>
    </Fragment>
</Wix>


Pay attention to GUIDs. If the add-in project is registered, you can find HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{6F28778F-1A45-36B4-8EA3-EA43DA4916C1}, HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{CBEEFAEA-BC94-35C6-89E1-7F7B3F4CC91B}, etc. Note that the interface keys refer to the type lib GUID and the type lib key refer to the folder in which the TLB file is located.

- Export all these keys (1 type lib key and 5 interface keys) to .reg files.
- Modify the REG files in this way: 1. replace HKLM with HKCU, 2. set the paths in the values to match the installation folder.
- Modify the setup project so that it deploys the TLB file (the Register property is vsdrfDoNotRegister).
- Build the setup project.
- Unregister the add-in project; note that this deletes the TLB file from the output folder of your add-in project.
- Register the modified .reg files.
- Install your add-in.

For me, the ComAddinWithEvents reference exists and I can select it.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 13 Nov, 2019 03:10:37 Top
ewessely




Posts: 35
Joined: 2019-01-31
Hello Andrei,

WOW! EXCELLENT!
I'll give it a try

Best Regards
Erich
ew
Posted 13 Nov, 2019 04:10:48 Top
ewessely




Posts: 35
Joined: 2019-01-31
Hello Andrei,

up and running :-)

thanks a lot

br
Erich
ew
Posted 13 Nov, 2019 15:31:08 Top
Andrei Smolin


Add-in Express team


Posts: 17361
Joined: 2006-05-11
Great!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 14 Nov, 2019 01:54:12 Top