[Mono-list] Running System processes from within mono
Kornél Pál
kornelpal at gmail.com
Sat Jun 24 15:20:32 EDT 2006
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" <lee at datatrakpos.com>
To: <mono-list at lists.ximian.com>
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 - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
More information about the Mono-list
mailing list