Todd_Anderson
asked on
How can I register a COM DLL using VB.NET 2.0?
I need to register a COM DLL using VB.NET 2.0. How can I do that? I just want it to do it without any windows or dialog boxes and if it fails for any reason to to continue on without causing an error.
Thanks,
Todd
Thanks,
Todd
ASKER
My application is already compete. Visual Studio created an interop DLL to go along with the COM DLL. I just need to be able to register the COM DLL and I want to do it using my application.
Todd
Todd
Then you can ignore the warning
Forget the last message...
You just need to make a reference to the interop assembly then.
You don't want to use late binding don't you? (If so you need reflection)
You just need to make a reference to the interop assembly then.
You don't want to use late binding don't you? (If so you need reflection)
ASKER
I need to register a COM DLL using VB.NET 2.0. How can I do that? I just want it to do it without any windows or dialog boxes and if it fails for any reason to to continue on without causing an error.
ASKER
Here is another way to ask my question. How can I do this in VB.NET 2.0 code?
regsvr32 <path & filename of dll>
regsvr32 <path & filename of dll>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You may also use System.Diagnostics.Process
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx
ASKER
For others, here is the VB.NET 2.0 code that I ended up using.
Shell("regsvr32 /s """ & MyDLL & """)
where "/s" causes the operation to be silent and MyDLL is a string that has the full path and dll name including ".dll". For example
MyDLL = "C:\Program Files\MyProgram\MyDLL.DLL"
Thanks for the help,
Todd
Shell("regsvr32 /s """ & MyDLL & """)
where "/s" causes the operation to be silent and MyDLL is a string that has the full path and dll name including ".dll". For example
MyDLL = "C:\Program Files\MyProgram\MyDLL.DLL"
Thanks for the help,
Todd
See the following
http://www32.brinkster.com/srisamp/netArticles/article_16.htm