Difference between revisions of "VB Component Registration for Distribution"
(Created page with "For example, you put your VB executable on a system and attempted to execute. An error message stated... Component 'mscomctl.ocx' or one of its dependencies not correctly reg...") |
m (→Windows Vista / 7) |
||
(One intermediate revision by one user not shown) | |||
Line 4: | Line 4: | ||
You could obtain a copy of mscomctl.ocx and just drop it in the same folder as your executable. However, this is not the correct way of doing things in Microsoft Windows. | You could obtain a copy of mscomctl.ocx and just drop it in the same folder as your executable. However, this is not the correct way of doing things in Microsoft Windows. | ||
+ | |||
+ | == Windows 2000 / XP == | ||
Place mscomctl.ocx in c:\windows\system32 then register the component with the following command: | Place mscomctl.ocx in c:\windows\system32 then register the component with the following command: | ||
Line 11: | Line 13: | ||
Which creates an entry in the windows registry and makes the component available to all Windows applications which may require it under Windows XP. | Which creates an entry in the windows registry and makes the component available to all Windows applications which may require it under Windows XP. | ||
+ | == Windows Vista / 7 == | ||
+ | |||
+ | All Visual Basic 6.0 runtime components are supported under Windows 7. | ||
+ | |||
+ | When trying to register a component such as MSCOCMCTL.OCX in Windows 7 you get an error such as DLLRegisterserver error code 0x08002801c | ||
+ | |||
+ | Use the following work around: (you will need administrator privilege account) | ||
+ | |||
+ | 1. Place mscomctl.ocx in c:\windows\system | ||
+ | |||
+ | 2. Create a batch file on the windows desktop called runme.bat and put the following command in the batch file: | ||
+ | REGSVR32 MSCOMCTL.OCX | ||
+ | |||
+ | 3. Copy runme.bat into the c:\windows\system directory (you will be nagged to do as administrator) | ||
+ | |||
+ | 4. Right click on the runme.bat and choose "Run as administrator" | ||
+ | |||
+ | 5. Delete the runme.bat after success | ||
+ | |||
+ | Your com object will be successfully registered. | ||
+ | |||
+ | Reference source: [http://social.msdn.microsoft.com/Forums/en/vbgeneral/thread/a6d06695-87b8-4fa6-8b9c-a3547829ab76 Can't figure out how to register MSCOMCTL.OCX in Windows 7] | ||
+ | |||
+ | | ||
[[Category:Computer Technology]] | [[Category:Computer Technology]] | ||
[[Category:Programming]] | [[Category:Programming]] | ||
[[Category:VB6]] | [[Category:VB6]] |
Latest revision as of 00:46, 30 November 2011
For example, you put your VB executable on a system and attempted to execute. An error message stated...
Component 'mscomctl.ocx' or one of its dependencies not correctly registered: a file is missing or invalid.
You could obtain a copy of mscomctl.ocx and just drop it in the same folder as your executable. However, this is not the correct way of doing things in Microsoft Windows.
Windows 2000 / XP
Place mscomctl.ocx in c:\windows\system32 then register the component with the following command:
regsvr32 \windows\system32\MSCOMCTL.OCX
Which creates an entry in the windows registry and makes the component available to all Windows applications which may require it under Windows XP.
Windows Vista / 7
All Visual Basic 6.0 runtime components are supported under Windows 7.
When trying to register a component such as MSCOCMCTL.OCX in Windows 7 you get an error such as DLLRegisterserver error code 0x08002801c
Use the following work around: (you will need administrator privilege account)
1. Place mscomctl.ocx in c:\windows\system
2. Create a batch file on the windows desktop called runme.bat and put the following command in the batch file:
REGSVR32 MSCOMCTL.OCX
3. Copy runme.bat into the c:\windows\system directory (you will be nagged to do as administrator)
4. Right click on the runme.bat and choose "Run as administrator"
5. Delete the runme.bat after success
Your com object will be successfully registered.
Reference source: Can't figure out how to register MSCOMCTL.OCX in Windows 7