[quoted text, click to view] Mystique wrote:
> 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
>
>
I generally capture both SYSOUT and SYSERR from the processes I create,
then to run CMD.EXE having it run my EXE. I log the captured output so I
can diagnose problems, such as yours. Running CMD.EXE gives you all
shell services. Essentially when you create a command line you are