Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers 2

up vote 6 down vote accepted

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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