Re: [Mono-list] shell another mono app with ProcessStartInfo

2009-04-26 Thread giancarlogiesa

thanks!!!
if some one need the code, i' m using this with success for:
load an exe application that need mono on windows and after exit:

private static void StartProcessAndExit(){
ProcessStartInfo ps = ps = new ProcessStartInfo
("C:\\Programmi\\Mono-2.4\\bin\\mono.exe","C:\\Programmi\\x.exe");
ps.WorkingDirectory =
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
ps.UseShellExecute = false;
ps.RedirectStandardOutput = true;
using (Process p = Process.Start (ps)) {
//p.WaitForExit ();
//string output = p.StandardOutput.ReadToEnd ();
//Console.WriteLine (output);
}
Environment.Exit(-1);

}
-- 
View this message in context: 
http://www.nabble.com/shell-another-mono-app-with-ProcessStartInfo-tp23242099p23245127.html
Sent from the Mono - General mailing list archive at Nabble.com.

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] shell another mono app with ProcessStartInfo

2009-04-26 Thread Andreas Färber
Hi,

Am 26.04.2009 um 15:42 schrieb giancarlogiesa:

>
> i have find one part of the solution:
>
> private static void Start(){
>
>   ProcessStartInfo ps = new ProcessStartInfo
> ("C:\\Programmi\\Mono-2.4\\bin\\mono.exe","C:\\Programmi\\x.exe");

Try monow.exe to avoid the Command Prompt popping up.

Andreas

>   ps.WorkingDirectory =
> Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
>   ps.UseShellExecute = false;
>   ps.RedirectStandardOutput = true;
>   Process p = Process.Start (ps);
> }
>
> but if i close the console application that run this code, the second
> application ( x.exe ) will be closed
> so i have two possible solution
>
> 1) hide the console application
> 2) make indipendent the second application
>
> i have no idea how i can do...
> -- 
> View this message in context: 
> http://www.nabble.com/shell-another-mono-app-with-ProcessStartInfo-tp23242099p23242296.html
> Sent from the Mono - General mailing list archive at Nabble.com.
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] shell another mono app with ProcessStartInfo

2009-04-26 Thread giancarlogiesa

i have find one part of the solution:

private static void Start(){

ProcessStartInfo ps = new ProcessStartInfo
("C:\\Programmi\\Mono-2.4\\bin\\mono.exe","C:\\Programmi\\x.exe");
ps.WorkingDirectory =
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
ps.UseShellExecute = false;
ps.RedirectStandardOutput = true;
Process p = Process.Start (ps);
}

but if i close the console application that run this code, the second
application ( x.exe ) will be closed
so i have two possible solution 

1) hide the console application
2) make indipendent the second application

i have no idea how i can do...
-- 
View this message in context: 
http://www.nabble.com/shell-another-mono-app-with-ProcessStartInfo-tp23242099p23242296.html
Sent from the Mono - General mailing list archive at Nabble.com.

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] shell another mono app with ProcessStartInfo

2009-04-26 Thread giancarlogiesa

Hello!

i have a problem to run another mono application,
i need to run mono before that, with a command like this with
ProcessStartInfo:

"C:\\Programmi\\Mono-2.4\\bin\\mono.exe C:\\Programmi\\x.exe"

with ProcessStartInfo, but it don' t load C:\\Programmi\\x.exe and don' t
return any error

thanks for help!
-- 
View this message in context: 
http://www.nabble.com/shell-another-mono-app-with-ProcessStartInfo-tp23242099p23242099.html
Sent from the Mono - General mailing list archive at Nabble.com.

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list