Intercepting commands between two separate executable files

  arguments, command, theory, windows

I was not sure where to post this but I guess I will need to make a program to do it, I am more after theory than someone doing any work for me. I am proficient at some languages. Reason I am asking this question is I want the developer to be more open about what he is doing rather than keeping it closed source.

I have 2 windows executables. Lets call them jxm1.exe and jmx2.exe.

jmx1.exe is the software you run to start the program. jmx1.exe then sends commands to jmx2.exe with command line switches / flags. I want to find out what these flags are. I was thinking of making a program to replace jmx2.exe but wondering how exactly I can get it to show me the command line arguments.

I could be going about this completely the wrong way and there might be better ideas. any appreciated.

Source: Windows Questions