Link to home
Start Free TrialLog in
Avatar of mikail
mikail

asked on

"runtime error 339, MSCOMCTL.OCX or one of its dependencies not correctly registered: a file is missing or invalid"

Why do I get a "runtime error 339, MSCOMCTL.OCX or one of its dependencies not correctly registered: a file is missing or invalid" whenever I try to execute my Visual Basic Application?
Also Component MSMASK32.ox or one of its dependencies is not correctly registered, a file is missing or invalid.
Avatar of AJAY CHADHA
AJAY CHADHA
Flag of India image

you have to manually registwr them with REGSVR32. Copy those controls to windows syetm folder and follow these steps...

Click on start menu-> Run

Type :- Regsvr32 c:\windows\system\mscomctl32.ocx

and press enter.

Your problem is solved...

same with the  second control as

Regsvr32 c:\windows\system\msmask32.ocx

Good Luck...

Ajay Chadha ... :-)
That will solve the problem..

Ajay Chadha ... :-)
Avatar of mikail
mikail

ASKER

what about WinNT and Win2K?
Avatar of mikail

ASKER

also my friends have complained that these two files dont exist on there system.
ASKER CERTIFIED SOLUTION
Avatar of AzraSound
AzraSound
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Those file must be copied in the system folders from a machine which have those files (your development machine).

For winnt & windows2k

Regsvr32 c:\winnt\system32\mscomctl32.ocx

Good Luck...

Ajay Chadha .. :-)
Personally I'll suggest you to make a setup of your application. It can be done through any Professional install MAker such as Wise Install Maker or InstallShield or the cheapest and best solution will be to go with the Package and deployment wizard which is shipped with Visual Basic Free of cost. It'll automayically include all the OCX's and Dll's Required by ur application and will automaticaly register htem on the user's machine...

Ajay Chadha ... :-)
well the best alternative is to go with Package and deployment wizard....

But, If you'd like to register them manually through the code then use this...

Private sub Form_load()
Shell "REGSVR32 /s c:\winnt\system32\mstask32.ocx"
End Sub

Good Luck...

Ajay chadha ... :-)
Hello mikail,

Any Response or Progress...???

Ajay Chadha ... :-)