We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

How to resolve the error message "ERROR 339 - COMPONENT 'COMCTL32.OCX' OR ONE OF ITS DEPEDENCIES NOT CORRECTLY REGISTERED: A FILE IS MISSING OR INVALID"

Medium Priority
2,428 Views
Last Modified: 2013-11-26
Hi Experts:

    I have a program written in VB6 working fine on many computers, but returned the following error messages on some computers:
**********************************************************************************
ERROR 339 - COMPONENT 'comctl32.ocx' OR ONE OF ITS DEPENDENCIES NOT CORRECTLY REGISTERED: A FILE IS MISSING OR INVALID
**********************************************************************************

Here are my observations up to now:
1. The executable and some accompanied OCX/DLL files (including COMCTL32.OCX) are placed in a network drive.
2. I searched around and found COMDLG32.OCX and MFC42.DLL may be related, but then I found that a computer with the issue also have these two files.
3. The copy of COMCTL32.OCX on netword path be being used, because if I remove it the program will not work on a computer that it originally works.
4. A non-working computer does not have a copy of COMCTL32.OCX

Can I have some idea how to fix the error? Where to check and what to try?

Thank you!
Comment
Watch Question

Type regsvr32 COMCTL32.OCX

in run or in cmd

Then run your program. COMCTL32.OCX should be in windows or system32 or in PATH

Author

Commented:
Hi C Security:

     Do you mean COMCTL32.OCX must be registered?
     The COMCTL32.OCX I put on network drive together with the program is definitely not registered (because it is on a network drive), but if I remove it, the program wouldn't work. Does this indicate that COMCTL32.OCX does not need registeration?
      I want to avoid registering ocx files in computers because not too many users have administers privilege, and manually register ocx files may also not be approved...
 
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
CERTIFIED EXPERT

Commented:
It is possible to run with the OCX on the network drive, provided it is in the same location as the exe file. (the application folder)

BUT...
If someone or some other application has installed and registered the comctl32.ocx to the local machine (which is probably the correct thing to do!), then that installed version will be the one used, regardless of what is in the application folder.

if you create a package for your application and get all users to run that, it will install the ocx for you (and all others needed). The trick is to change the install package so that it references (not install) your exe on the network drive. That way you can post updated exe file without needing all users to reinstall. (At least until you update a required control).  

All this can be done using the VB Application and Package Wizard, as ive used it for 2 current projects and havent required a new package for quite a while.  If a new pc is rolled out, run the package once on it.

Author

Commented:
Hi robertbaron:

    I found it is not possible, because I encountered a computer without comctl32.ocx, but the program still not running, so I think it is as what C Security said: it must be registered.

Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.