How do I invoke a child process from C# with UseShellExecute set to false and allow file deletion?
The child process is a java program creates a 0 byte file, transfers it to a remote server, and deletes it. This functionality works when I execute the java program from the Windows command line.
If I invoke the java program from C# using a System.Diagnostics.Process instance with StartInfo.UseShellExecute set to false, the child process does not delete the file. In fact, processing stalls and nothing happens. If the Process object's StartInfo.UseShellExecute property is set to true, the child process can delete the file, and execution of the parent process proceeds. However, I need the UseShellExecute property to be false so I can redirect output from the child process.