Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is a simple Windows 32-bit program that will pop a dialog box with the list of all the command-line agruments it received.

The idea is that you build the executable printargs.exe. You rename it to whatever target program call you're trobleshooting and replace the target program with it temporarily. If it's called at all, it will reveal command-line parameters, passed to that target program.

You'll need some version of Microsoft Visual C++ compiler to build executable. I wrote this program in 2001 and originally used Visual C++ 6.0, but I tried more recently Visual C++ 2015, and it still compiles, although with lots of warnings, which I may eventually address.

Build steps:

  1. Open cmd.exe prompt and run vcvars, for example on my system I run this: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat".
  2. Validate that vcvars did it's job: echo %INCLUDE%. You should see something like this: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE;....
  3. Switch to folder where printargs.c is: cd Documents\GitHub\misc\printargs. Run dir, you should see printargs.c.
  4. Run command-line compiler: cl printargs.c shell32.lib user32.lib. This should produce a lot of warnings about type casting and printargs.exe.

I also created a batch file build.bat that does the same.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.