PDA

View Full Version : registering OCX files in Windows 10



JeffDC
11-10-2016, 01:13 PM
We install an old VB6 program, which includes several older .ocx files in the Program Files (X86) folder.
We are using the Run Program command to run regsvr32.exe to register the .OCX files.
However, after install, we get an error message 339 saying the OCX or one of its components not correctly registered, and we then have to open the command prompt as admin and manually register the files.

Is there a better way to register old OCX files in Windows 10?

Details for Run Program command:
Target = %SYS32DIR%
Command Line = /s %_SB_INSTALLDIR%/COMCT232.OCX
Default Directory = %_SB_INSTALLDIR%
The following are checked :
Wait for program, Use ShellexecuteEx, Run elevated from non elevated
Conditions = OS independent (all checked)
Feature: Always Install

linder
11-11-2016, 11:26 AM
Hello Jeff,

A better way would be File Properties -> Advanced Tab -> "Register as OCX/DLL/EXE/TLB" checkbox.

Does this help?

Friedrich

JeffDC
11-11-2016, 05:07 PM
The files are downloaded and extracted from a zip file into the installation directory. How do I then set the File Properties?

linder
11-15-2016, 02:04 AM
Then you can use the "Register File Operation..." script function and set the "Queue existing OCXs/DLLs/EXEs/TLBs file for self registration" or "Register OCXs/DLLs/EXEs/TLBs file immediately" options.

Does this help?

BTW, but the question is, why does your use of regsvr32.exe fail. You need administrator execution level privileges to "self-register" files. Make sure that your setup.exe execution level is set to the default "requireAdministrator".

Friedrich

Unregistered
12-12-2016, 05:28 PM
Then you can use the "Register File Operation..." script function and set the "Queue existing OCXs/DLLs/EXEs/TLBs file for self registration" or "Register OCXs/DLLs/EXEs/TLBs file immediately" options.

Does this help?

BTW, but the question is, why does your use of regsvr32.exe fail. You need administrator execution level privileges to "self-register" files. Make sure that your setup.exe execution level is set to the default "requireAdministrator".

Friedrich

The "Register OCXs/DLLs/EXEs/TLBs file immediately" option worked. I added an include script with all of the .ocx files to be registered. The execution level was already set to "requireAdministrator".

linder
12-13-2016, 11:07 AM
Perfect! Thanks for the update.

Friedrich