I have an application that calls a console based application when I open a file. I would like to somehow "spy" on this console application so that when it gets called I would like to see what command line parameters are being passed to this console app.

Is this possible?


For Windows, Use Process Explorer. Once PE is running, go to the View menu and select the Select Columns item. On that dialog, check the Command Line checkbox and click ok. You should see command line arguments for each process in Process Explorer now.

alt text

For most Unix or OS X systems, doing ps auxw will print all processes on the system along with the command line arguments passed to them. Look up the man page for ps on your particular OS for more information on ps and what options you can pass to it to change its output.


Since you say "exe", you're likely on windows. If that is the case Process Monitor would show you exactly what you need and more: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.