0

I'm looking for a Windows feature or third-party tool that can produce a list of active processes (as in the task manager) with the command line used to start each process.

e.g. if I launch "php.exe -q script.php" in a command line, during the execution of my process, I'd like to see this command in the list and not only "php.exe"

Tasklist, process explorer, taskinfo... can't give this information and/or make it available in a text format. Do you know if such tools/features exist?

Thanks

rkolm_kds
  • 3
  • 1
  • 2

1 Answers1

5
wmic process list full /format:htable > wmic_task_list.html

or

wmic process get Name,ProcessId,CommandLine /format:table > wmic_task_list.txt

See wmic process list /format /? or wmic process get /format /? for a list of valid output formats.

Ansgar Wiechers
  • 4,247
  • 2
  • 18
  • 26
Dusan Bajic
  • 2,056
  • 1
  • 18
  • 21
  • On my system `table` worked with normal user rights, while `htable` as well as the other XSL-based formats required admin privileges. – Ansgar Wiechers Sep 03 '12 at 20:01
  • wmic.exe is no longer provided in windows. https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic – J Decker Aug 24 '23 at 22:26