Thursday, 10 January 2008

Reg-less Com component deployment

I was developing a Windows application which uses an Activex control from a third party vendor. I registered the control, made a reference to the component in my project, and the application run very well. I made a ClickOnce deployment for my application and try to run the application from a web page in another computer which doesn't have the activex control registered, I didn't find any luck. The application failed to start.

I noticed after I register the activex control in that computer manually, the application run immediately. It turns out the deployment package doesn't register the activex control automatically. I don't want to register the activex control in every computer of our clients, because the maintenance will become a nightmare.

Then I came across this page when I did some gooling:

http://msdn.microsoft.com/msdnmag/issues/05/04/RegFreeCOM/default.aspx

It talks about how to deploy an activex control without registering it. This is page is just what I need.

I followed the procedure by changing the Isolated property of the COM reference to true. When I run the application locally, I saw the dll file containing the COM component was copied to the bin folder of my project.


After I deploy the application to my website again with the change, I run the application successfully even without the activex control registered.

No comments: