.:: CODE SNIPPET ::.

"Your time is limited, so don't waste it living someone else's life"

Start process without console window


To start a process and get out it’s output stream, you can use ProcessStartInfo like:

var startInfo = new ProcessStartInfo("net.exe", "use \\192.168.100.10")
                {
                    UseShellExecute = false,
                    CreateNoWindow = true
                };
var process = Process.Start(startInfo);
process.WaitForExit();
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: