How can I find out if an .EXE has Command-Line Options?

51

Suppose you have an .EXE and you want to check if it has Command-Line Options. How can one know if the .EXE has this ability. In my case I know that Nir Sofers WebBrowserPassView.exe has the ability to start it via cmd.exe and WebBrowserPassView.exe /stext output.txt. But how can I find out if I don't know?

This question is tagged with command-line executable command-line-arguments exe

~ Asked on 2012-01-15 11:08:33

The Best Answer is


69

The easiest way would be to use use ProcessExplorer but it would still require some searching.

Make sure your exe is running and open ProcessExplorer. In ProcessExplorer find the name of your binary file and double click it to show properties. Click the Strings tab. Search down the list of string found in the binary file. Most strings will be garbage so they can be ignored. Search for anything that might possibly resemble a command line switch. Test this switch from the command line and see if it does anything.

Note that it might be your binary simply has no command line switches.

For reference here is the above steps applied to the Chrome executable. The command line switches accepted by Chrome can be seen in the list:

Process explorer analyzing Chrome.exe

~ Answered on 2012-06-07 02:18:04


25

Invoke it from the shell, with an argument like /? or --help. Those are the usual help switches.

~ Answered on 2012-01-15 11:09:58


Most Viewed Questions: