Runtime Error 339: “Component not correctly registered,” explained and fixed

Error 339 names a component — “Component 'MSCOMCTL.OCX' not correctly registered” is the famous one — and says its file is missing or invalid. The program depends on an old ActiveX control that Windows doesn't have registered, usually because the software was copied rather than installed, moved to a new PC, or is meeting 64-bit Windows with 32-bit parts.

What it means

Legacy Windows programs build their windows from shared controls (.OCX files) that must be both present and registered — Windows keeps a registry entry pointing at the file. Error 339 fires at startup when the program asks for a control and the registration isn't there, the file isn't there, or the file present is the wrong version.

The fix, in order

  1. Read the file name in the message. Everything targets that one component (common ones: MSCOMCTL.OCX, MSFLXGRD.OCX, COMDLG32.OCX, TABCTL32.OCX).
  2. Reinstall the program properly. Its installer registers its controls; copying a program folder from an old PC does not. A proper reinstall fixes most 339s outright.
  3. Check whether the file exists. On 64-bit Windows, 32-bit controls belong in C:\Windows\SysWOW64; on 32-bit Windows, in C:\Windows\System32. If the file is in the program's own folder instead, that's often the problem.
  4. Register it manually if the file exists but isn't registered: open Command Prompt as administrator and use the regsvr32 matching the control's bitness — for the usual 32-bit controls on 64-bit Windows:
    C:\Windows\SysWOW64\regsvr32.exe "C:\Windows\SysWOW64\MSCOMCTL.OCX"
    A “DllRegisterServer … succeeded” message confirms it. (Counter-intuitively, SysWOW64 is the 32-bit folder; System32 is 64-bit.)
  5. If the file is truly missing, get it from the program's installer or the software maker — run the installer and let it place the correct version. Some suites (old accounting and point-of-sale packages especially) need their exact bundled version.
  6. Run the program once as administrator after registering — some legacy apps complete their own registration on first run and need the rights to do it.
Do not grab the OCX from a random “OCX download” site. Wrong versions cause the next error, and those sites bundle junk. The program's own installer is the safe source.

If it still happens

If registration succeeds but the error persists, the control likely has a missing dependency of its own (older controls lean on specific runtime DLLs) — reinstalling the parent program's full runtime package is the reliable route. On a business machine, also check with whoever supports the software: legacy line-of-business apps often have a documented “new PC” procedure, and 339 is precisely the error it exists to prevent.

Common questions

Why does this appear after moving to a new computer? Because the old PC had the controls registered by years of installs, and the new one doesn't. The program folder copied over; its registrations didn't.

SysWOW64 or System32 — which one? 32-bit controls register with the regsvr32 in SysWOW64 on 64-bit Windows. Using the System32 (64-bit) regsvr32 on a 32-bit OCX produces a different error about the module failing to load.

Related errors

Runtime Error 429 · Runtime Error 380 · Runtime Error 217