Link to home
Start Free TrialLog in
Avatar of TelDig
TelDigFlag for Canada

asked on

Register an OCX on Windows Server 2008, Vista and Windows 7

Hello,

I am running into an issue here where I am trying to register an OCX  dynamically in an C++ MFC application in Windows Server 2008. The problem is that the OCX doesn't seem to be recognized at all, and the application just never opens.

I have also tried to register the OCX manually with the following command:
regsvr32 "Path\my.ocx"

and it gives me the following error:
The module "Path\my.ocx" was loaded but the call to DllRegisterServer failed with error code 0x80040200.

I have read around and found out that the problem seems to be because I have not run regsvr32 with admin rights. Is that correct?

The problem is that we are trying to update the current OCX of an old application.

My question is:
What would be the best way to register an OCX under Windows Server 2008/Vista/7 without having to worry about admin rights? I cannot use an InstallShield to update the existing applications that are already deployed.

Thank you.
Avatar of Amandeep Singh Bhullar
Amandeep Singh Bhullar
Flag of India image

You need to be administrator of pc, or run execute it as 'run as administrator'

Check the forum
http://bytes.com/topic/visual-basic-net/answers/631245-dllregisterserver-failed-error-code-0x80040200
Avatar of TelDig

ASKER

Thank you for your reply. Yes I am aware that running regsvr32 as administrator will register the OCX properly.

However, we have a lot of end users that need the OCX registered and they do not possesses admin rights.
What I am looking for is another way around this, because I cannot use an InstallShield to update the OCX component of our end users.

Any suggestions?
ASKER CERTIFIED SOLUTION
Avatar of gemarti
gemarti
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial