Click here to Skip to main content
15,918,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to register my dll and OCX file at run time. I want that with my DLL and OCX should be register through coding.

Is there any idea how can i pass command line arguments at run time?

Thanks

Dhaval Shukla
Posted
Comments
shukla dhaval 15-Jun-10 6:36am    
Thanks it's helpful to me.

1 solution

You can try like this.

Dim comRegisterProcess As New Process()
comRegisterProcess.StartInfo.FileName = "regsvr32.exe"
comRegisterProcess.StartInfo.UseShellExecute = False

'Register the controls and DLLs.

Const  dllPath As String = "c:\com\abc.ocx"
comRegisterProcess.StartInfo.Arguments = String.Format(" /s""{0}""", dllPath)
comRegisterProcess.Start()
comRegisterProcess.Close()


Note: to use the Process class you need to improt System.Diagnostics namespace.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900