Registering ActiveX DLLs and OCXs

C

Chris Petchey

I have a VB.NET application which installs/updates other applications.
Some of these other applications are VB6.
Part of the processing includes registering the OCXs and DLLs and I use
the DLLSelfRegister function from the vb6stkit.dll

As a VB.NET desktop utility this worked well. However,I have made the
application into a service (customer's requirement) running in an
administrators account.
Now DLLSelfRegister fails to register the component, returning a value
of FAIL_OLE = 3 which means "unable to initialize OLE to register file"

I can shell to RegSvr32.exe from my service and that works well also,
but doesnt return a success or failure value.

Is there anyway to register an activex dll or ocx file from vb.net that
will work from in a service, or is there anything I can do to my service
to make vb6stkit.dll work?

thankyou
 
P

Paul Clement

¤
¤ I have a VB.NET application which installs/updates other applications.
¤ Some of these other applications are VB6.
¤ Part of the processing includes registering the OCXs and DLLs and I use
¤ the DLLSelfRegister function from the vb6stkit.dll
¤
¤ As a VB.NET desktop utility this worked well. However,I have made the
¤ application into a service (customer's requirement) running in an
¤ administrators account.
¤ Now DLLSelfRegister fails to register the component, returning a value
¤ of FAIL_OLE = 3 which means "unable to initialize OLE to register file"
¤
¤ I can shell to RegSvr32.exe from my service and that works well also,
¤ but doesnt return a success or failure value.
¤
¤ Is there anyway to register an activex dll or ocx file from vb.net that
¤ will work from in a service, or is there anything I can do to my service
¤ to make vb6stkit.dll work?

Your service is probably running under a least privileged account which wouldn't have sufficient
permissions to access the registry. You will probably need to run your service under a local machine
account that has sufficient registry permissions.


Paul
~~~~
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top