Hi,

You should separate file name and arguments:

System.Diagnostics.Process.Start("shutdown", "-r now");

Note that if you still get an exception you probably have no shutdown in you 
path.

Kornél

----- Original Message ----- 
From: "Lee" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, June 24, 2006 9:06 PM
Subject: [Mono-list] Running System processes from within mono


> Can someone provide a sample of calling an external application from 
> within
> a C# app?
>
> I've tried a vew simple things like:
>
> System.Diagnostics.Process.Start("shutdown -r now");
>
> I have also tried placing escapted quotes around the command such as this:
>
> System.Diagnostics.Process.Start(""\shutdown -r now"\");
>
> Either way, I get "Can't find specified file".
>
> Thank you,
>
> Lee
>
> _______________________________________________
> Mono-list maillist  -  [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-list 

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to