Type Library File not registering. - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

s7msun
Posts: 2
Joined: Thu May 26, 2011 2:04 pm

Type Library File not registering.

Hi all, my query is per subject.

I have added our TypeLibrary file in the COM (Project Details) section of Advanced Installer.

All seems to go through fine without any problems.

Our application (not the TLB) has the following line of code in the source (C++) to see if the Type Library is registered on the system:

Code: Select all

BOOL bTL = AfxOleRegisterTypeLib( AfxGetInstanceHandle(), _tlid, _T("sevensoft.TLB"), NULL );
    if( !bTL ) {
        if( IsTypeLibRegistered() != 1 ) {
            AfxMessageBox("Type Library is not loaded! You may need to run again as an Administrator") ;
        }
    }       
Now running the app as admin then registers the TLB file and everyone is happy, there's a ticket tape parade, children line the streets cheering etc :lol:

The question is why is the TLB not registering during install. Its a fairly old TLB file, and this issue seems to only occur on Win7 or Vista machines. We have tried rolling the app out as a MSI through group policy but no joy, and this is a massive problem for us, as it defeats the object of rolling out an MSI, if a standard user cant use the software because a component isn't registered!

Any help on this one would be appreciated as we are truly stuck!
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Type Library File not registering.

Hello and welcome to the Advanced Installer Forums,
Now running the app as admin then registers the TLB file and everyone is happy
By this do you mean that the application you need installed automatically registers the .TLB file outside the installer?

Since the .TLB is old, I also recommend you to manually try to register the .TLB before registering it from within the installer.

If you can manually register it on a Vista or above machine but it fails when included from the COM page, can you please also send us the .TLB file to support at advancedinstaller dot com so we can investigate its behavior?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
s7msun
Posts: 2
Joined: Thu May 26, 2011 2:04 pm

Re: Type Library File not registering.

Hi thanks for your response.

The application when launched does check to see if the TLB is registers, if it isnt it tries to register it itself. The fact the TLB is not registering during install is a problem for people using MSI rollout, as they normally have restricted user accounts who cant register it manually.

Interestingly I've tried to register the TLB manually from command prompt and it says successful.

I have sent the tlb file with a link to this topic. Thanks.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Type Library File not registering.

Hello,

The COM page uses the Windows Installer method to register the .TLB. We have tested this on a Vista x64 and Windows 7 x64 OSs and indeed get the same behavior.

As a workaround you can try to add a "Launch file or open URL" predefined custom action after the Install standard action. In the command line field you can add the command you used to manually register the .TLB. You should also mark it as "Deferred with no impersonation" and add a similar custom action for unregistering the .TLB on uninstall. The execution condition for the unregister custom action should be:

Code: Select all

REMOVE="ALL"
All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”