How to register .ocx file from code
See the question and my original answer on StackOverflowAlthough it does not strictly answer the question, there is also a way to register a DLL without using regsvr32 which is an external program. There is an example of such a code here: Register and Unregister COM DLLs from C#