javawindowscommand-lineprocess-explorer

How to know which command-line process is executing?


How to know that process is running which command using any command-line tool, I am aware that with the help of process explorer we can see it, but is there any command line tool(standalone) or java method I can use to extract this information?

There is a tool called PsList which gives basic information about process, but there is no option to see command-line


Solution

  • I found the way which is without dependency on other tool or process explorer, using Windows WMI service, run the following command from command prompt :

    WMIC path win32_process get Caption,Processid,Commandline
    

    It just solve my problem.