Windows – I can’t get command line parameters of .exe file

command linewindows

I am trying to get the command line parameters of this file FileASSASSIN.exe – http://www.portablefreeware.com/?id=1092

I tried this: FileASSASSIN.exe /help, FileASSASSIN.exe /? and other variations but it didn't work.

I am trying to integrate FileASSASSIN in FileMenu Tools Portable and i need to use parameters to make it work – FileMenu Tools allows you to run a program from the context menu. I manage to do that for Unlocker Portable without using parameters, but for FileASSASSIN it doesn't work without parameters.

Best Answer

There is no reliable way of getting the command line parameters out of an executable. At least as long as the author or the executable does not want to provide the information.

Therefore my answer is also generally valid for any executable:

You can try the SysInternals Strings utility to dump all human readable content and maybe you find something.

Usually the output is quite long, so you want to dump it into a text file and later analyze the textfile with a text editor

strings -n 3 -q myapplication.exe > params.txt

For your first try you can use Strings on itself:

strings -q strings.exe > strings.txt

You should find the undocumented /accepteula switch. The other switches are hard to find, because they are single character switches.

Check in advance if the executable is packed by something like UPX. If so, unpack it before running Strings on it. If the executable is UPX packed you should get some output similar to this at the beginning:

!This program cannot be run in DOS mode.
Rich
UPX0
UPX1
.rsrc
1.22
UPX!

But even if you don't find anything, there might still be command line parameters, but they are just not available in a human readable format (but maybe encrypted).

And of course, also consider that one option is that the executable does not take any command line parameter.

Related Question