Redistributing Files(.ocx) Problem
-
Hi, I have found very good information from this blog. http://blogs.msdn.com/vcblog/archive/2007/10/12/how-to-redistribute-the-visual-c-libraries-with-your-application.aspx?CommentPosted=true#commentmessage[^] But I have one quetion and also problem which is related to this blog topic redistributing the library. I have created Visual Studio’s setup project in which I have added Activex (.ocx) control in it and also I have included appropriate .MSM file and its accompanying policy .MSM to distribute the library. My package is created successfully(in VS 2005). And I try to install it on the different machine(without VS 2005) but ask for the installing .Net Framework 2.0 but I did not install it and try to install other setup file(which also created with our main setup file) and it perfactly installed. And now What I have to do to use that Activex (.ocx) control directly in other application. May I directly register it using REGSVR32.exe or any other setting I have to do? Please suggest me if you can. It will be very helpful to me. Thanks.
Ashish Bhatt
-
Hi, I have found very good information from this blog. http://blogs.msdn.com/vcblog/archive/2007/10/12/how-to-redistribute-the-visual-c-libraries-with-your-application.aspx?CommentPosted=true#commentmessage[^] But I have one quetion and also problem which is related to this blog topic redistributing the library. I have created Visual Studio’s setup project in which I have added Activex (.ocx) control in it and also I have included appropriate .MSM file and its accompanying policy .MSM to distribute the library. My package is created successfully(in VS 2005). And I try to install it on the different machine(without VS 2005) but ask for the installing .Net Framework 2.0 but I did not install it and try to install other setup file(which also created with our main setup file) and it perfactly installed. And now What I have to do to use that Activex (.ocx) control directly in other application. May I directly register it using REGSVR32.exe or any other setting I have to do? Please suggest me if you can. It will be very helpful to me. Thanks.
Ashish Bhatt
Hi All, I have solved my problem But as I explained in my problwem that I have to register my Activex control manualy using REGSVR32.exe but now I want that my activex control should be registerd directly during setup installation.I little much know how to register activex using DllRegisterServer but how can I code for that in setup project?Should I have to include other project in that setup project's solution? Your any suggetion will be apprecited by me.Your reply is valuable for me. Thanks in Advance.
Ashish Bhatt
-
Hi All, I have solved my problem But as I explained in my problwem that I have to register my Activex control manualy using REGSVR32.exe but now I want that my activex control should be registerd directly during setup installation.I little much know how to register activex using DllRegisterServer but how can I code for that in setup project?Should I have to include other project in that setup project's solution? Your any suggetion will be apprecited by me.Your reply is valuable for me. Thanks in Advance.
Ashish Bhatt
Make sure your .ocx is added to the installation project to be installaed to some location. In the Visual Studio Installer, in the "Project Exporer" you should have an item called "Associations". Double click on this to open the view. I'm assuming the .ocx is an ActiveX control which would mean you want to add a COM Object. Use the ActiveX controls CLSID for the identifier. Make sure it is selected and go over the "Properties" window. Select "Component", click the "..." button and hit the "the following component" radio button, and double click on your .ocx file in the list. The other options in the Properties window will default to the settings needed for InProc Servers (if I remember correctly) so if your component is typical, you will likely use the defaults but be aware of these settings if you find it's still not registering correctly. One word of caution, the MSI will register and deregister the file the CLSID path refers to for you. During development, when you manually register new versions, always keep in mind to check OLEView to ensure the last registered ProgID is pointing to the CLSID component that you would expect. This is more troublesome in a VB environment since you have to explicitly set "binary compatibility" to reuse the same CLSID. Just be aware to always check OLEView if something is not right on your development box. I find I still need to use "regsvr32.exe" on a regular basis without regards to my deployment .msi during development. Hope that helps