Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two programs:

When A.exe is running, it calls B.exe with a series of arguments.

Any suggestions as to how can I see these arguments? I could write another B.exe program to do that, but it sounds more complicated than it needs to be.


share|improve this question
up vote 7 down vote accepted

Have a look at Process Explorer, which comes from sysinternals.

share|improve this answer
and what if process lives < 2 secs, so Process Explorer wont just show it even if refresh timeout is large? – kagali-san Nov 19 '10 at 2:14
@mhambra, in that case, the OP should write another B.exe that just logs the passed arguments. – OscarRyz Nov 19 '10 at 2:23
sure.. just thought of some universal profiler for tracing mingw's compilations (not c:\bin\sh). – kagali-san Nov 19 '10 at 2:34
@mhambra, in that case, apimon and set filter on CreateProcess calls maybe helps, but I didn't try it myself cuz I'm in Debian now. I found this: so called strace for Win32 but I didn't test it so not sure if it works. – Xiè Jìléi Nov 19 '10 at 7:07

I think Windows SDK has xperf.exe and it can trace process calls too. Not sure. Not a Win* man.

share|improve this answer

This should work on Windows an Linux, but I'm not sure:

import sys
print sys.argv #This prints a list of all arguments
if '--option' in sys.argv:
    pass #do something
share|improve this answer

Your Answer


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.