Register Visual-Basic 6 Component Manually?

2

I made VB6 Applications and used some components like Winsock, Webbrowser and etc in my program.
Now when i run my application on any other computers, it says :

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


The Ways i tried:
I tried to copy mswinsck.ocx to System32 folder and try to open the application again, but this error comes again !
So i think i can register this component using :

Regsvr32 mswinsck.ocx

but i couldn't succeeded !
Also i don't want to use Installer programs. so

My Question:
How can i Register a Visual Basic 6 Component Manually ?

Amirreza Nasiri

Posted 2013-07-04T11:47:46.860

Reputation: 2 418

Answers

3

Try the following:

  1. Install the Visual Basic 6.0 SP6 run-time files.

  2. If you're on a Win7 64-bit PC then copy the DLLs, OCXs etc. to %windir%\SysWoW64 and not %windir%\System32 (see here for an explanation).

  3. Open an elevated/admin command prompt (search for cmd in the Start Menu search box, right-click, Run as administrator) and try to register the OCX using regsvr32.

  4. If none of this works you might need to add the VB6 licensing keys to the registry. See this KB article for details.

Karan

Posted 2013-07-04T11:47:46.860

Reputation: 51 857

1

According to the Microsoft Support page How to register an ActiveX control (.ocx) manually, use:

Regsvr32 /s MSWINSCK.OCX

Der Hochstapler

Posted 2013-07-04T11:47:46.860

Reputation: 77 228

1/s seems to be just for silent mode, so if without it the command failed it shouldn't work with it either. – Karan – 2013-07-04T17:49:41.673

I Tried it without /s parameter, because its for Silent-Mode. However Karan said. – Amirreza Nasiri – 2013-07-04T18:05:27.307