MSCOMCTL.OCX missing on Windows 2008 R2

2019-09-07 10:54发布

问题:

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

回答1:

For some reason MSCOMCTL.OCX didn't get copied / registered to the correct folder when installing the downloaded runtime VisualBasic6-KB896559-v1-ENU.exe.

These manual steps fixed it

  1. Use 7-Zip to unpack VisualBasic6-KB896559-v1-ENU.exe
  2. Copy the contents to %systemroot%\SysWow64
  3. From command line, execute

    %systemroot%\SysWoW64\regsvr32.exe %systemroot%\SysWOW64\mscom ctl.ocx

  4. Try running your archaic Visual Basic app again!