Calling console applications - problem -
01-09-2006
, 04:36 PM
Hi
I have created a Windows Service in C# that calls other (console)
applications that operate on files. I call a console application (PGP.exe)
that encodes a file and creates a new encoded file. The source code is:
Process aPGPSigning = new Process();
ProcessStartInfo anInfo = new ProcessStartInfo();
anInfo.FileName = "PGP.exe";
String anArguments = "-s ";
anArguments += inFile;
anInfo.Arguments = anArguments;
anInfo.UseShellExecute = true;
aPGPSigning.StartInfo = anInfo;
aPGPSigning.Start();
The encoded file does not get created from the service, but if I call the
console application (PGP.exe) to encode the file from the command line, it
works.
Is there any special case for calling other applications form services, or
maybe the user does not have permissions to create the file (the folder was
given full permissions), or is it another problem ?
Regards,
Mystique |