Can I register multiple *.tlb files at once in Inno Setup?

0

When I try to register all the *.tlb files using a wildcard:

RegisterTypeLibrary(Is64BitInstallMode, ExpandConstant('{app}') + '\TLB\*.tlb');

I get the runtime error 0x80029C4A.

Does it mean that I have to register all the files one by one? Is there a way to register a folder?

registry
inno-setup
tlb
asked on Stack Overflow Mar 20, 2020 by JConstantine

1 Answer

1

You cannot use a wildcard for registering the .tlb file. See the documentation:

Prototype: procedure RegisterTypeLibrary(const Is64Bit: Boolean; const Filename: String);

e.g. RegisterTypeLibrary(Is64BitInstallMode, ExpandConstant('{sys}\stdole2.tlb'));

Also check the correct platform: Is64BitInstallMode() has nothing with .tlb bitness (you can register 32 bit .tlb on 64 bit system without any problem.

The exception is shown if you try to register library for incorrect platform, which might be your problem.

  • Extra tip: try to run the installer as Administrator, usually the libraries have to be registered in admin mode.
answered on Stack Overflow Mar 20, 2020 by Slappy • edited Mar 20, 2020 by Martin Prikryl

User contributions licensed under CC BY-SA 3.0