How to Install a COM using ClickOnce

2019-03-31 15:04发布

问题:

I have installed my windows application that uses TeeChart ActiveX (a COM Component for charting) using ClickOnce.

If I register manually TeeChart using regsvr32 teechart8.ocx, my application works fine. But I want and I need to install the application using ClickOnce.

How can I do that?

回答1:

ClickOnce can only copy files. So you have these options:

  • Use Reg-Free COM as Jeff Hall suggests. This is probably the best option if you can do it.
  • Run regsvr32 manually when your .exe file first loads (before it tries to access the COM objects)
  • Create a custom clickonce prerequisite package which installs the COM objects


回答2:

Use Reg-Free COM. Check out this MSDN article