R
Rich Smith
Is there a way to get the Command Line Arguments of a running process?
myProcess.StartInfo.Arguments is empty and doesn't work.
I am looking to find the Arguments for any process that is already
running including ones that I did not personally start.
Here is what I can get so far...
Process[] runningProcesses = Process.GetProcesses();
foreach(Process process in runningProcesses)
{
Console.WriteLine(process.StartTime.ToLongTimeString());
Console.WriteLine(process.ProcessName);
Console.WriteLine(process.MainModule.FileName);
Console.WriteLine(process.MainWindowTitle);
Console.WriteLine(process.MainModule.FileVersionInfo.FileVersion);
}
myProcess.StartInfo.Arguments is empty and doesn't work.
I am looking to find the Arguments for any process that is already
running including ones that I did not personally start.
Here is what I can get so far...
Process[] runningProcesses = Process.GetProcesses();
foreach(Process process in runningProcesses)
{
Console.WriteLine(process.StartTime.ToLongTimeString());
Console.WriteLine(process.ProcessName);
Console.WriteLine(process.MainModule.FileName);
Console.WriteLine(process.MainWindowTitle);
Console.WriteLine(process.MainModule.FileVersionInfo.FileVersion);
}