add-in not installing on some machines...

D

davidcjmack

The installer stops with the error

"Could not register type library for file mscorlib.tlb"


It's an add-in for Excel that has been COM 'shimmed'.

Any ideas what's going on here?
 
X

XL-Dennis

David,

Looks like the mscorlib.tlb has not been properly installed or accidently
been unregistered on the machines.

Choose one of the 'troubled' computers and do the following to re-register
the tlb-file.

1. Locate the REGTLIB.EXE
2. Locate the mscorlib.tlb.
3. From the command line execute the following:
path\regtlib.exe path2\mscorlib.tlb
4. Reboot the computer.
5. Try to install the add-in.

If this does not solve the issue pls check out the following MSFT's
Knowledge Base article: http://support.microsoft.com/kb/906763/en-us

BTW, what version of .NET Framework is in use?
 
D

davidcjmack

Using 2.0.50727.

The steps you suggested result in the message

"Registration of <path...>\mscorlib.tlb successful."

which seems great, except I still get the same error when I run the
add-in installer - why would it be trying to register it if it was
already registered though?!

I am also unable to perform the repair to the .net framework (as
outlined in the knowledgebase article) as the users affected do not
have admin accounts.



Thanks for your help though.
 
X

XL-Dennis

David,

OK, let see if we can come up with some workaround despite the limited
account's rights.

If You don't have a complex setup You may try to install it manually on one
machine to test if it's doable or not.

1. Copy the shimmed DLL and the underlying assembly to a folder.
2. Registrate the shimmed DLL via the regsvr32.exe.
3. Start Excel.

The above should be possible to do even if You have codesigned the shimmed
DLL and also using a strong name for the underlying assembly.

Kind regards,
Dennis
 
D

davidcjmack

The c# assembly is indeed signed with a strong name key.

But when I run regsvr32.exe comshim.dll, I get
"DllRegisterServer <path..>\comshim.dll failed.

Return code was: 0x80070005"

which seems to be 'access denied'. This is equivalent to the error I
get if I continue with the install even though mscorlib.tlb failed to
register (HRESULT -2147024891).

I really appreciate your help on this confusion...
 
X

XL-Dennis

David,

I was not surprised with the outcome as it also point to the same issue with
the .NET Framework.

Unfortunately I'm not able to give a clear solution but the last approach I
would suggest is to install the C# assembly via the utility regasm.exe

1. Locate the regasm.exe on one of the machines.
2. From the commandline: path\regasm.exe path\NameOfAssembly.DLL

If this work then we at least have a solution although not the best.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top