Hi!. If i'm not wrong, if i want to execute a shell command like "ls -lh" I must paste the following code:
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName= "ls";
proc.StartInfo.Arguments = "-lh";
proc.Start();
proc.WaitForExit();
The problem is that it doesen't work unless i'm root. Otherwise I get:
Unhandled Exception: System.ComponentModel.Win32Exception: Cannot find the specified file
in <0x00657> System.Diagnostics.Process:Start_common (System.Diagnostics.ProcessStartInfo,System.Diagnostics.Process)
in <0x0003d> System.Diagnostics.Process:Start (System.Diagnostics.ProcessStartInfo)
in <0x00029> System.Diagnostics.Process:Start (string)
in <0x0000f> prueba:Main ()
Is there a way to execute a shell command without being root ?
Thanks.
- Re: [Mono-list] command Fabian
- Re: [Mono-list] command Jonathan Stowe
- Re: [Mono-list] command Fabian
