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)