5
votes

I am deploying a .NET VSTO application via click once. The application's main assembly needs to be registered for COM interop as part of the installation process. I know that this can be done by writing code to execute "REGASM assembly.dll /tlb", but the problem is that the target workstations that will be installing my application don't have administrative rights, so the regasm fails when trying to register the type library.

My question is, how can I register my .net assembly for com interoperability when I don't have administrative access?

4
Reg-free COM is the usual answer for this. Just not for an Office app, there are way too many add-ins that are competing to do the same. And break your manifest in the process. You can't get it deployed anyway, writing to the office install directory requires admin privileges. Very much incompatible with a ClickOnce deployment. There is no alternative but the user acknowledging "yes, go ahead and mess with my machine". If she trusts you there isn't a problem.Hans Passant
This seems like the (unfortunate) answer to me. I can't check off a comment though!Dan Ling

4 Answers

3
votes

You could use registration-free activation of COM components. I have used this in an application deployed via click-once and it worked well. Here are a few links to get you started:

Registration-Free Activation of .NET-Based Components

Walkthrough: Manually Deploying a ClickOnce Application

How To: ClickOnce deployment for unmanaged app with COM component in managed assembly

3
votes

I came across registration-free COM while researching a related problem. I didn't end up using it, so I can't say for sure if it will solve your problem, but it might be worth checking out:

Simplify App Deployment with ClickOnce and Registration-Free COM

Registration-Free Activation of .NET-Based Components: A Walkthrough

1
votes

Don't think you can. Might be wrong but a big part of COM is really just a way to find things via the registry. If you can't edit the registry... you are in trouble.

http://en.wikipedia.org/wiki/Component_Object_Model#Registry

1
votes

It depends on the scenario, but maybe Registration free COM (using a manifest) will help. See this article