Hi, new user with a question - this looked like the most appropriate board to post this on, so please bear with me if it should have been somewhere else (the VB6 & earlier board didn't feel like the most appropriate place for it based on the board description).

I'm currently using a VMWare-hosted VM running Windows 7 Professional 64-bit with SP1 and VB6 SP6 and I recently uninstalled an application that uses the MSCOMCTL.OCX file which has pulled it out of the Windows Registry.

The Windows Registry for the OCX control looks like this:

Code:
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.0
    (Default)    REG_SZ    Microsoft Windows Common Controls 6.0 (SP6)
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.0\0
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.0\0\win32
    (Default)    REG_SZ    C:\Windows\SysWow64\MSCOMCTL.OCX
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.0\FLAGS
    (Default)    REG_SZ    2
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.0\HELPDIR
    (Default)    REG_SZ    C:\Windows\HELP
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.1
    (Default)    REG_SZ    Microsoft Windows Common Controls 6.0 (SP6)
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.1\0
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.1\0\win32
    (Default)    REG_SZ    C:\Windows\SysWOW64\mscomctl.OCX
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.1\FLAGS
    (Default)    REG_SZ    2
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.1\HELPDIR
    (Default)    REG_SZ    C:\Windows\HELP
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.2
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.2\0
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.2\0\win32
I have a legacy application project in VB6 that uses the MSCOMCTL.OCX control and if I open this project up, it's looking for the 2.2 entry for MSCOMCTL.OCX: I've tried manually adding in the corresponding keys and values under the "HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.2" entry, and setting "HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.2\(Default)" to "Microsoft Windows Common Controls 6.0 (SP6)" displays the correct title in the Components dialog box

If I then add the file location under "HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.2\0\win32\(Default)", when I try loading the project, the IDE goes into a "Not Responding" state after a few seconds and I don't appear to make any further progress.

I have tried adding in the "HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.2\FLAGS\(Default)" key as "2" and the "HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.2\HELPDIR\(Default)" key as "C:\Windows\HELP", but these didn't work either.

The way I get round this at the moment is to keep the VB6 IDE and project loaded and use Start | Shut down | Sleep at the end of the working day so that the current state is preserved.

Now, it does appear in the Components dialog box as shown in the attached images below:

Name:  Components List 1.png
Views: 880
Size:  40.0 KB - Components dialog showing the entry for MSCOMCTL.OCX 2.2
Name:  Components List 4.png
Views: 932
Size:  45.7 KB - Components dialog showing the entry for MSCOMCTL.OCX 2.1

Does anyone know how I can fix this? I do have a copy of the VB6 SP6 installer on the VM's drives so I could try running that again and see if it can overwrite the Registry settings.