问题
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
from the KB896559 at https://www.microsoft.com/en-US/download/details.aspx?id=10019.
These manual steps fixed it:
- Use 7-Zip to unpack VisualBasic6-KB896559-v1-ENU.exe (NB: executing this file won't install anything!)
- Copy the contents to %systemroot%\SysWow64
From command line (run
cmd
as administrator), execute%systemroot%\SysWoW64\regsvr32.exe %systemroot%\SysWOW64\mscomctl.ocx
Try running your archaic Visual Basic app again!
来源:https://stackoverflow.com/questions/25634767/mscomctl-ocx-missing-on-windows-2008-r2