The product that I'm working on requires that a type library file (suffix .tlb) be registered for internal COM communication between components to work correctly. On production machines this registration is performed by the InstallShield setup. On developer machines, however, we so far depended on the utility regtlibv12.exe to do the job.
While upgrading our dev environment to Visual Studio 2017 (previously Visual Studio 2013) we found out that regtlibv12.exe is no longer present. A quick search through the entire machine for regtlib*, tlb*.exe and other likely patterns did not yield any result. Also, my Internet search-fu did not produce anything useful - but I simply may have used the wrong keywords...
Do you know of any utility that is deployed with Visual Studio 2017 that can replace regtlibv12.exe? Anything that can be run from a PowerShell script is acceptable. Also acceptable is a hint for the relevant .NET API that I could use to code the registration process myself (I might even go so far as to try to p/invoke Win32 functions). Not acceptable are solutions that need to be run as part of the build process - I don't want the type library to be registered on the build server!
Specific to my situation, I was "lucky" because our main executable is as an out-of-process COM server, so when a client creates a COM object our main executable is launched as a separate process and our manifest takes effect. Had our COM object been in an in-process COM server, the client executable's manifest would have taken effect and I would have had to add the manifest snippet to the client executable.
As a final remark, I would like to add that this solution is probably not generally useful. What others could take away from here is that COM registration in the Windows registry can be obviated by a technique called "Isolated COM", which is also known as "Registration-Free COM". Whether you can take advantage of Registration-Free COM very much depends on how your COM servers and COM clients are deployed, and whether you have control over the manifests used by COM servers and clients.
As usual with COM, it's not a simple subject, but as a starting point for your research I can recommend the 2005 MSDN article Registration-Free Activation of COM Components: A Walkthrough, and its .NET companion Registration-Free Activation of .NET-Based Components: A Walkthrough.
Regasm only works for TLB files generated for .NET assemblies. So, you have to use regtlibv12.exeYou can find this file in C:\Windows\Microsoft.NET\Framework\v4.0.30319 if you have Visual Studion 2010 installed.
I'm working for an organization that runs some very old software throughout the enterprise. This software works fine in operations, but I'm trying to find a solution to efficiently deploy installations of it to hosts running modern versions of Windows. When the software is installed normally, it displays an error regarding a ".tlb" file in the Windows\System32 folder. The error says "Unable to register the type library: RegisterTypeLib failed; code 0x8002801C. Error accessing the OLE registry". After doing some research, I believe that the application is trying to find regtlib.exe, or regtlibv12.exe, to complete the registration of the type library. Unfortunately, this seems to have been removed from .NET Framework some time ago, and thus cannot be found by the application. I've seen some other solutions to this side-stepping the need for regtlib with Powershell or C#, but I'm simply not the coder I'd like to be yet and don't have the understanding of what's going on in them to see what's happening.
This particular software is packaged into an executable using the Inno Setup, which is normally friendly to unattended installs. However, this error appearing each time the software is installed on a modern version of Windows renders this process impossible.
I have not gotten to try this yet. I'd need to get the msi extracting software approved for use in my enterprise first, though I might be able to do that on a personal machine and transfer the .exe. I'll let you know as soon as I can how it goes. And thank you!
@Michael Butt The failure of the RegisterTypeLib function indicates that type library registration has already been attempted by the installer. The presence or absence of a third-party utility is unrelated to the failed registration attempt.
The RegisterTypeLib function can fail and return the above error code if it is called from a process that is not running with elevated privileges as Administrator. Type Library registration writes data to HKLM\Software\Classes\TypeLib and can also write to HKLM\Software\Classes\Interface.
Yes, I've tried running the installer as an administrator. This is actually the only way it runs altogether. I'm going to attempt the solution provided by Jiachen Li earlier and then update this thread. Thank you for your advice nonetheless!
If the regtlibv12.exe missing error appears on your PC, you can use the methods below. Some are automatic, which means you can start a process to let the system automatically restore the file. Others are manual, meaning you will have to manually download regtlibv12.exe and move it to the correct program installation folder. If you are not very experienced with digging through system files and would prefer not to, you can simply go straight to an automatic method.
Outbyte PC Repair allows you to automatically repair EXE errors, without you having to worry about choosing the right file or registering it. The utility will not only download the correct version of regtlibv12.exe for free and suggest the right directory to install it to but will also resolve other issues related to the regtlibv12.exe file.
Driver updates for the Windows operating system, as well as for network adapters, monitors, printers, etc., can be downloaded individually and installed from the Windows Update Center or by using specialized utilities.
Outbyte Driver Updater automatically updates drivers on Windows. Routine manual driver updates are now a thing of the past. Just with a few clicks you can automatically search your system for outdated drivers and update all of them.
The new version of Windows 10 has a built-in application called "Windows Defender", which allows you to check your computer for viruses and remove malware. In order to use the Windows Defender offline scan, follow these steps:
Outbyte products are some of the most popular and effective programs for dealing with malware and unwanted programs, and they will come in handy even if you have a high-quality third-party antivirus installed. This software is specifically designed to complement your antivirus, not replace it. In the new version of Outbyte, scans can be performed in real time and manually. To initiate a manual scan please follow the steps below:
Many users are familiar with the sfc/scannow system file integrity check command, which automatically checks and fixes protected Windows system files. It is often one of the first things experienced Windows users do when they encounter errors.
Keep in mind that System File Checker (SFC) cannot fix integrity errors for those system files that are currently being used by the operating system. To fix these files you have to run SFC command through the command prompt in the Windows recovery environment. You can get into Windows Recovery Environment from the login screen by clicking Shutdown, then holding down the Shift key while selecting Restart.
This operation will take a while and it is important to wait until it is complete. When finished, close the command prompt and restart the computer as usual. You should find that the regtlibv12.exe missing error is gone.
System Restore is very useful if you want to fix regtlibv12.exe error, or almost any other error. Using the "System Restore" function, you can choose to restore Windows to a date when the regtlibv12.exe file was not damaged. Restoring Windows to an earlier date cancels changes that were made to system files since that date. Please follow the steps below to roll back Windows using System Restore and get rid of the regtlibv12.exe error.
c80f0f1006