How to Fix Run time Error 339 on Windows 11 / 10

There might be multiple reasons for the run time error 339 when you run a program. Some of them can be some ocx or dll files are missing, corrupted, or dlls or ocx are not registered. This will be an annoying experience for the smooth execution of applications. Below are the few possible error messages you might see for runtime error 339

Error – Runtime error 339: Component DUZOCX32.OCX is not correctly registered or the file is missing.

Error – Runtime Error 339. Component MSMASK32.ocx or one of its dependencies is not correctly registered; a file is missing or invalid.

Error – Runtime error ‘339’: Component “FM20.DLL” or one of its dependencies is not correctly registered: a file is missing or invalid.

Error – Runtime error 339 MSCOMCTL.OCX

You might encounter runtime errors for different ocx or dll files as you see in the above error messages. Let us see how to fix this error below by taking an example on one ocx file.

Method 1: Reinstall the application

Sometimes DLLs or ocx files get corrupted while faulty installations or get deleted in faulty uninstallation. First and foremost you can try to reinstall the application throwing the error. This might help you to recover corrupt dlls or ocx files. After reinstallation recheck whether the issue still exists. If the issue exists still then go to the next method.

Method 2: Replacing and registering MSCOMCTL.OCX file

As it is mentioned above one of the reasons for error can be due to MSCOMCTL.OCX file. Let us see how we can replace the corrupt/missing file.

Step 1: Press Win + R, type ms-settings:about, and click OK.


About Cmd Min


Step 2: In the About window check for the System type. It will show a 64-bit operation system, x64 based process for 64 -bit system in system type. If it is a 32-bit system then the System type will show as a 32-bit operating system,x32-based processor.


System Type Min


Note: Screenshots are based on a 64-bit machine

Step 3: Now download Microsoft Visual Basic 6.0 Common Controls depending upon your system type from the Microsoft website here.


Visual Basic Download Min


Step 4: Now use WinRar or &-zip to unzip it. Open the unzipped folder and look for file mscomctl.ocx in it.


Extract Min


Step 5: Now copy mscomctl.ocx file from the unzipped folder and paste it into the below paths based on your system type.


File Min

Note: Please take the backup file if it exists in the below path before replacing it.

For 32-bit system copy in path : C:\Windows\System32
For 64-bit system copy in path : C:\Windows\SysWOW64


Syswow64 Min


Step 6: Now press Win+R, type cmd, and click OK.


Cmd Run Min


Step 7: Type the below commands as per your system type to register the ocx file you have copied now.

For a 32-bit system:

cd C:\Windows\System32

regsrv32 mscomctl.ocx

For a 64-bit system:


regsvr32 mscomctl.ocx


Register Min


Step 8: A registration success popup will appear. Click OK.

Step 9: Now try to reinstall the application which was throwing the error and recheck whether the issue is resolved.

Hope now you are able to resolve Run time error 399. Comment and let us know which method worked for you. Thank you for reading.