Registering ocx files during installation?!

williery10 used Ask the Experts™
Hi there,
I have a project that uses a number of third active party activex components. During development these of course have to be registered (using RegSvr32.exe) but I find it strange that in order for the compiled project exe file that the components have to be registered on the machine the exe is running. I also discovered that inorder to register these that "Active X" need to be installed on the machine in order to register the third party components. Is this right? It really doesn't seem logical to have to do all this for a compiled exe. Also if the above is true, can anybody recommend a good free to download installer for windows that will do the above as I am currently using a batch file to register the components which requires the user to click ok for each component. Any help with this would be great.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Hello williery10 !

Why don't you use the wizard included in vb6 to make a setup. This will register the ocx's on the target machine.

VB comes with the package and deployment wizard that takes care of all this for you.  Go to Add-ins...Add-In manager and load the Package and deployment wizard.  It will create an installer for you.

Sorry for the simultaneous post.

Now I will address your concerns about registering the components on the client machine.  Windows needs to know which components are available for the use of applications.  It cannot simply assume all files are components as they are not.  In order to facilitate that, the registry contains references to those components you have indicated you particular machine can use.  I could download components all day long without wanting to use them (prehaps I want to see their internal functionality), so Windows won't recognize it unless I "register" it saying it's ok with me to use that component.  This is a GOOD thing because web pages can download components to your hard drive.  Now along comes VB.  VB will register any component you wish to use in your development environment.  If a component isn't registered when  you decide to add a reference to it, VB registers it automatically so it seems invisible to you, but it is only because it is a step done automatically.  Since you're not distributing VB with your app. You need to tell the client machine that it is OK to use the components that your program requires.

I hope this helps.


Thats a brilliant help, thanks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial