3
votes

Have a lot of older VB6 apps running at work and starting to bring in Win7 machine.

I run one and find an error of OCX registration along the lines of ...ocx is not registered.

RegSvr32 \\Uhsfp1\UserPrograms\sharedcomponents\UHSLineItems.ocx 

and no errors when run as an admin from cmd prompt.

I run the app again and I read an error:

An error was encountered granting access to certain features in this application. ActiveX component can't create object.

Really don't want users to see that.

Any ideas?

TIA

3

3 Answers

3
votes

Is it a 64-bit machine? Try registering with C:\Windows\SYSWOW64\regsvr32.exe instead of the default which would be C:\Windows\System32\regsvr32.exe. The former is the 32-bit version which should make your components available to other 32-bit programs.

2
votes

Try unregistering the OCX and then registering it again.

1
votes

You need to make sure that the command prompt (or calling process) is running elevated in order for regsvr32 to succeed on Windows 7