Registering OCX with regsvr32.exe and having it available for all users

TroggleDorf picture TroggleDorf · Dec 16, 2012 · Viewed 21.4k times · Source

I have a third party web application that relies on a particular OCX file to be registered on the user's computer. I have gone into the computer as an administrator and registered the file with the command:

REGSVR32 /S MyFile.ocx

This works fine and I am able to use the web application without issue. In regedit I can see the control has registered properly.

However when another user logs onto the computer who is not an admin and tries to run the web application it does not work.

If I add that user to the administrators group and have them run the REGSVR32 command it works fine for them. Unfortunately it really isn't feasible for me to allow all users to be administrators on their machines.

Is there a way I can register the OCX file with REGSVR32 and have it available to all users, even those without admin rights?

Thanks!

Answer

Vlad Bezden picture Vlad Bezden · Dec 16, 2012

Usually regsvr32 registers CLSID info in HKEY_LOCAL_MACHINE\software\Classes, so registration should be visible to all users.

The problem could be with your OCX. It might do something on start up that prevents to open it for non-admin users. For instance it requires to write something to HKEY_LOCAL_MACHINE registry, write to Windows directory, ...

You can check if this OCX is doing something for non-admin user by using Process Monitor tool and check for ACCESS_DENIED errors.

In case if your OCX doesn't do anything under admin account, what you can try to do is to register you OCX under HKEY_CURRENT_USER lever by using RegSvrEx tool. This way your OCX will be registered under current_user_level