[RESOLVED] Passing DOS commands from vb.net
Hi Everyone,
I am looking for a cleaner way to pass command line arguments from my vb.net 2005 application.
Currently I am using the below code. The code works as desired, BUT it leaves an instance of cmd.exe running in my processes. These processes eventually accumulate and slowly become annoying.
Does anyone know of a cleaner way to be able to code the desired information so that I do not have a cmd.exe instance left running on my machine? Thanks!
Perhaps using "System.Diagnostics.ProcessStartInfo" and "System.Diagnostics.Process"?
Code:
Shell(Environ$("comspec") & " /k net view > " & Chr(34) & "C:\netview.txt" & Chr(34), AppWinStyle.Hide)
Re: Passing DOS commands from vb.net
Re: Passing DOS commands from vb.net
Thanks Rob,
That works perfectly!
Re: [RESOLVED] Passing DOS commands from vb.net
The code seems to work fine except that it does not generate the textfile for me. I'm confused... Any good ideas?
Re: [RESOLVED] Passing DOS commands from vb.net
Don't ask questions in resolved threads. It would help to see the code you ended up with.