I'm looking for a tool or method to find out what command line parameters have been passed to a program, for example when it was run by another program (launcher-application scenario).
You can do that using Process Explorer.
Just hover with your mouse over a process to see the command line arguments used to start it:
Alternatively, you can open the properties of the process and inspect the command line right there:
You can do it without Process Explorer, too, using Windows' WMI service. Run the following from the command prompt:
If you want to dump the output to a file (makes it a bit easier to read), use the /OUTPUT switch:
When using CygWin, if I start a Python process, this is an example of command line:
But Process Explorer only sees the main exe:
(note the "path: [Error opening process message]" (see EDIT-1)).
Same results for
So, the only trick I know until now, is finding it via CygWin Bash shell
It is useful to know this, as long as CygWin cohabits with no problems in Windows, and you can use it to run many POSIX and Python programs.
EDIT: In Windows you don't seem to need administrator priviledges for tasklist. In CygWin you will need them to be able to view an administrator's process (what seems more logical to me: the full command-line could have some parameters like passwords inside), so we must run the CygWin Bash in elevated Administrator Mode.
EDIT-1: This problem will not happen if you run Process Explorer as administrator. Thanks you for pointing, @Pacerier.
powershell to the rescue.
find, and kill as bonus. you can run it from powershell directly or from a ps1 if you've got your system setup. I detail unrestricted script setup on i kill zombies with powershell as well as other powershell tricks...
One can also achieve that by using Task Manager.
Open task manager (by CTRL-SHIFT-ESC, CTRL-ALT-DELETE or any other method).
For Windows 7 (and probably Windows XP):
For Windows 8:
A column of Command lines of will be added to the currently displayed columns.