Re: Process.Start questions
- From: "Hank" <sorry@xxxxxx>
- Date: Mon, 27 Feb 2006 11:00:26 -0600
See if this doesn't work: (this code is using CF 2.0, if you can't use that,
use OpenNETCF's API -- same syntax)
System.Diagnostics.ProcessStartInfo psi = new
System.Diagnostics.ProcessStartInfo(myExe, args);
psi.UseShellExecute = false;
System.Diagnostics.Process process = null;
process = System.Diagnostics.Process.Start(psi);
// Wait until process exits. Timeout should be enough to have it make
// sense to kill process if it expires.
bool exited = process.WaitForExit(timeout);
if (exited)
int exitCode = process.ExitCode;
"Steve B." <steve_beauge@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:eTsJdU7OGHA.1032@xxxxxxxxxxxxxxxxxxxxxxx
The app I'm launching is an app written in C# too...
I've not found how to fix the exit code of the process in C#.
Writing a file is a possible way, but I don't found this solution
pretty...
Thanks,
Steve
<chris-s@xxxxxxxxxxxx> a écrit dans le message de news:
1141054022.124413.236480@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Is the 'command line application' one that you have written yourself?
If so, can you store the result into the registry or a file or maybe
create/delete a file with a specified name to indicate the result being
returned?
Back in the days of DOS, you use to be able to exit an application with
a 'result code' and then pick this up, not sure whether the same is
available now tho.
Chris
.
- Follow-Ups:
- Re: Process.Start questions
- From: Steve B.
- Re: Process.Start questions
- References:
- [CF 2.0] Process.Start questions
- From: Steve B.
- Re: Process.Start questions
- From: chris-s
- Re: Process.Start questions
- From: Steve B.
- [CF 2.0] Process.Start questions
- Prev by Date: Re: Problems with MSMQ, WM5 and (possibly) PXA270
- Next by Date: [OT] /german/ UserGRoup Ruhrpott
- Previous by thread: Re: Process.Start questions
- Next by thread: Re: Process.Start questions
- Index(es):
Relevant Pages
|
|