Getting process information in .NET
问题 Duplicate of this question. update - This is not an exact duplicate. See my solution. I see a java.exe process in process explorer, and double clicking it gives me its working directory & starting command line arguments. From .NET, I run the following code and get a process with the same PID but the above fields are empty. Apparently, this is documented. foreach (Process process in Process.GetProcessesByName("java")) { ... } So how do I get the correct startinfo field values, without peeking