0

I want to start a program using a batch-file. When I start the program manually (just double-clicking the exe-file) I have to select two file paths manually. I want to make a bat-script which starts the program and passes these two paths as arguments, so that the paths are already set when the program starts. The problem is that I don't know what the program will accept as arguments, or what order the of the arguments should be.

Is there any way of figuring out which arguments an exe-file can take?

pose
  • 21
  • 3
  • For passing arguments to an `exe-file`, the exe-file should support `command line arguments` which again depends on the implementation in the program. – Santosh A Dec 11 '14 at 12:01
  • Thank you for answering. I guess this is the kind of stuff I want to find out, somehow. All I know is that I have an exe-file, and I am trying to figure out if and/or which parameters I can pass to it. – pose Dec 11 '14 at 12:03

1 Answers1

0

If the exe doesn't provide a help output using ? or h as parameter and there is no doc, there is no easy way. Depending on the language the program is written in and whether you are allowed to decompile it or not, you might use tools like Reflector to decompile it and check which arguments are possible. This might help you: How do I decompile a .NET EXE into readable C# source code?

However, most software licenses prohibit decompiling even if they can't prevent it.

Community
  • 1
  • 1
MichaelS
  • 5,941
  • 6
  • 31
  • 46