The cheap way would be to just call regsvr32.exe there same way you would call it on the command line. Just use Process.Start() variant that takes two parameters.
The hard way is to use P/Invoke to call the DllRegisterServer() entry point of the DLL you are trying to register. That is essentially what Regsvr32 does anyway.
Out of curiosity, why would you want to do this registration in your console app? Registration should be done at setup time when your app is installed.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.