Thursday, 11 October 2012

How to fix error 1911- Could not register type library for file.

I landed into problems when a patch I had created failed during installation and gave the error “Error 1911. Could not register type library for file x. Contact your support personnel”. This was not the first time I have dealt with the same installation error but this time it was different because it occurred on a patch.

Here are some tip on how you can fix this problem:

This error is likely to occur if the installation package extracts the wrong COM information  i.e an old library version could be registered at build time. The fix  to this is to clean the build machine, this involves using Regclean or any other such tool to remove registry information which could be out-dated or from an older version. Replace the components, register them afresh and redo the build.

If cleaning the build doesn't work, The second approach would be to check if there are double entries in the Typelib table in direct editor. If there is more than one entry, delete the one with the wrong Lib ID. You could also remove the dll from the project, restart the project then re-add the dll again otherwise completely remove the library file if you do not need register the file.

When dealing with a patch, maybe you should try finding out if the developer had broken the components compatibility. Patching components with broken binary compatibility can be a real pain. If true, ask the developer to restore compatibility and recompile the components.

No comments:

Post a Comment

Comment