It is necessary to obtain information about the process in php (php + IIS + WinServer 2012):
- process_id - pid
- parent process_id - ppid
- username - username, whose name was launched the process displayed in the Task Manager in the "user"
I use two approaches
exec('C:\Windows\System32\tasklist.exe /FI "pid eq 99999" /FI "USERNAME eq MYUSERNAME"', $output);
If such a process is, it appears, but I can not get parent_process_id :(
If I use:
exec('C:\Windows\System32\wbem\wmic.exe process where 'parentprocessid=\"$ppid\"' get parentprocessid,processid"', $output);
I can not get username :(
Someone faced with a challenge or know how to get this information?