SteveO
SteveO

Reputation: 477

Win7 problem with VB6 ocx registration

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

Upvotes: 3

Views: 6107

Answers (3)

CJ7
CJ7

Reputation: 23275

Try unregistering the OCX and then registering it again.

Upvotes: 2

Matt Wilko
Matt Wilko

Reputation: 27322

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

Upvotes: 1

mdm
mdm

Reputation: 12630

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.

Upvotes: 3

Related Questions