OCX errors unless run as admin

bilbonvidia

New member
Local time
12:21 PM
Messages
14
I have a program that when run as a normal user throws errors about ocx's being missing or not correctly registered. I dont want to grant users admin to run it. It runs with admin privileges fine.

The thing is, once the program or a certain function has been run as admin that function will then run as a normal user. Why is this? Are files being registered as they are used?

Is it possible to ensure all the files in the WHOLE program folder are registered somehow if the intaller is not doing it properly? REGSVR or similar?

The program worked fine on Windows XP.
 

My Computer My Computer

Computer Manufacturer/Model Number
asus
OS
Windows 7 Ultimate
CPU
5400
Motherboard
asus
Graphics Card(s)
5770
OCXs are library files that contain controls and functions used by applications (technically called "ActiveX controls"). To use those functionality, the OCX must be "registered", that is, certain registry entries are created so the program can look it up and use it. Problem is that those registry entries are located under the HKEY_CLASSES_ROOT, which by default is writable only by administrators. So at least, the registration process must be run as admin. From then, every user can read and use the OCX.

It seems that the program is not registering the OCXs properly. Ideally, it should be done during install (which needs admin right anyway), but a buggy installer may fail to do this. In that case, the program may fall back to register on the very first use, which requires admin rights. After that first use, normal users can work normally. On XP with no UAC around, by default everyone is admin so it should work, but fail with a standard user.


Regsvr32 does precisely that registration process manually. You call it once for each OCX and DLL file on the program folder to ensure each one is registered. Note that it may fail for certain files, since it's only applicable on ActiveX components, so ignore all errors you get. Of course, you need to do that in an elevated command line.
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
thanks for the reply, can some help with this batch file I want to run from an elevated command I can get it right:

for %a in ('dir C:\Program Files (x86)\Star\my program\*.dll') do regsvr32 /s %a
for %a in ('dir C:\Program Files (x86)\Star\my program\*.ocx') do regsvr32 /s %a

for %a in ('dir C:\Program Files (x86)\Star\my program\directory1\*.dll') do regsvr32 /s %a
for %a in ('dir C:\Program Files (x86)\Star\my program\directory1\*.ocx') do regsvr32 /s %a

pause
 

My Computer My Computer

Computer Manufacturer/Model Number
asus
OS
Windows 7 Ultimate
CPU
5400
Motherboard
asus
Graphics Card(s)
5770
Back
Top