Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Registering ocx controls manually
Message
From
29/01/1999 10:12:53
 
 
To
29/01/1999 08:20:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00181728
Message ID:
00181790
Views:
10
>I'm having trouble with my application in some offices
>that gives me an error
>
>"ole error code ox80040154 class not registered.
>it works fine on some machines but not others.
>
>
>How can I register this manually?

You can use REGSVR32 to register an OCX; the command from a DOS prompt or the Run menu should look like:

[DriveLetter:][path]REGSVR32 [DriveLetter:][path]< name of file >

If REGSVR32 is on the search path, you can omit it's path; if you run this from the directory that the OCX resides in, you can omit the path of the OCX.

To register F:\MyApp\MyControl.OCX from the command line, with REGSVR32 in the Windows System directory (on the search path by default) you'd use the following command line in the Run box:

REGSVR32 F:\MyApp\MyControl.OCX

If a control is failing to register, you should be getting a messagebox with an error code when the control fails to register that tells you why it refused to register (in a matter of speaking; the codes are pretty cryptic). If the control registers by hand after the fact, it's likely that the .OCX is dependent on one or more files copied to or registered on your system after the attempt to register the OCX in your install process; often, resequencing the install will correct the problem. As a rule, I'd try to have my install copy out and update common components such as the MSVCRT-, MFC-, and OLE- families of .DLLs that are normally installed to the System directory; if the control relies on other OLE-based services (things like DAO and ODBC dependencies have bitten me in the past), I'd try to install those components before registering the controls as well.

Resequencing a Setup Wizard install is tough since we don't have a great deal of documentation on the underlying command language used in the .STF file, which drives the installation process; it's a matter of experimenting to get things just right, and more often than not, you'll break things several times in the course of hacking the .STF file. In addition, you'll have to do the same thing from scratch if you generate the Setup Wizard install again. This is another reason that I rely on an installer other than Setup Wizard to put everything but the runtime in place; I have greater control over the exact sequence of events with something like InstallShield Pro, and can run the Setup Wizard's runtime install as one of the steps in my InstallShield script.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform