0

Migrating a legacy Visual Basic application from Windows 2000 to Windows 2008 R2, I get the error

Component 'MSCOMCTL.OCX' or one of its dependencies not correctly registered: a file is missing or invalid

Installing VisualBasic6-KB896559-v1-ENU.exe didn't help

fiat
  • 15,501
  • 9
  • 81
  • 103

1 Answers1

2

For some reason MSCOMCTL.OCX didn't get copied / registered to the correct folder when installing the downloaded runtime VisualBasic6-KB896559-v1-ENU.exe from the KB896559 at https://www.microsoft.com/en-US/download/details.aspx?id=10019.

These manual steps fixed it:

  1. Use 7-Zip to unpack VisualBasic6-KB896559-v1-ENU.exe (NB: executing this file won't install anything!)
  2. Copy the contents to %systemroot%\SysWow64
  3. From command line (run cmd as administrator), execute

    %systemroot%\SysWoW64\regsvr32.exe %systemroot%\SysWOW64\mscomctl.ocx

  4. Try running your archaic Visual Basic app again!

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
fiat
  • 15,501
  • 9
  • 81
  • 103
  • I believe the most recent version of mscomctl.ocx (6.1.98.46) is included in VB60SP6-KB3096896-x86-ENU.msi https://www.microsoft.com/en-us/download/details.aspx?id=50722 Microsoft Visual Basic 6.0 Service Pack 6 Security Rollup Update 1/8/2016 – ryanmonk Feb 28 '17 at 07:52