"Object library not registered" when try to open VB6 project

magg picture magg · Jun 19, 2014 · Viewed 16k times · Source

I am trying to open VB6 project and getting "Object library not registered" error.

Machine is 64 bit. I tried below but it threw error saying "'regtlib' is not recognized as an internal or external command, operable program or batch file."

cd C:\Windows\SysWOW64
regtlib msdatsrc.tlb

'C:\Windows\Microsoft.NET\Framework64\v4.0.30319' folder has 'regtlibv12' file. I tried 'regtlibv12 msdatsrc.tlb' in that folder but it did not help.

I read on one of the forum that un-installation of internet explorer 10 is solution, I tried that but did not help.

I would highly appreciate your suggestion.

Answer

Kevin Sandow picture Kevin Sandow · Jun 19, 2014

The regtlb.exe is used to register type libraries, in older Windows versions it can usually be found under

c:\windows\system32\RegTlb.exe

The .Net Frameworks bring a new version:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regtlibv12.exe

You should be able to register any *.tlb files with

regtlibv12.exe file.tlb

And unregister with

regtlibv12.exe -u file.tlb

You'll have to make sure that both files are accessible, when switching in on of the .Net folders use the full path to your type library.

And of course you actually need to have the file present, otherwise registration won't work.