Batch file to Check if .exe file has a command line switch
Moderator: DosItHelp
Batch file to Check if .exe file has a command line switch
Hi guys,
I have been searching through on the internet for code that will check to see if an exe file contains any command line switches.
Unfortunately, I have been unable to find any.
MY Q: Does anybody know of, or write a piece of code that will check to see if an exe file contains any command line switches, and if it does, what they are?!
Thanks,
bentom123
I have been searching through on the internet for code that will check to see if an exe file contains any command line switches.
Unfortunately, I have been unable to find any.
MY Q: Does anybody know of, or write a piece of code that will check to see if an exe file contains any command line switches, and if it does, what they are?!
Thanks,
bentom123
Re: Batch file to Check if .exe file has a command line swit
That will be tricky cause every program has it's own switches even the help switch -help or --help or -h
Re: Batch file to Check if .exe file has a command line swit
Hi,
Thanks for your quick reply
There must be a way...
Thanks for your quick reply
There must be a way...
Re: Batch file to Check if .exe file has a command line swit
bentom123 wrote:Hi,
Thanks for your quick reply
There must be a way...
Can a computer figure out what I am thinking. There must be a way!

Did you try Google Searching. I got a couple of hits. Don't know if they work.
http://www.technospot.net/blogs/find-co ... g-cmdline/
http://www.softpedia.com/get/System/Lau ... nder.shtml
But I would at least try typing the obvious after the name of the program as stated above.
/?
-help
--help
/help
Re: Batch file to Check if .exe file has a command line swit
Squashman wrote:But I would at least try typing the obvious after the name of the program as stated above.
/?
-help
--help
/help
plus some others to try:
-h
-?
?
help
Re: Batch file to Check if .exe file has a command line swit
What is the program? Googling can help too.
Re: Batch file to Check if .exe file has a command line swit
Hi,
thanks for all your replies
The batch file will use different exe files, so it is crucial that it manage's to find the switches...
Thanks for your reply
thanks for all your replies

The batch file will use different exe files, so it is crucial that it manage's to find the switches...
Thanks for your reply

Re: Batch file to Check if .exe file has a command line swit
Not gonna happen!
Re: Batch file to Check if .exe file has a command line swit
It depends on the developer of a software whether or not he enabled command line options, what names they have and what meaning/functionality is associated. Generally a batch file cannot determine that. It's good practice that those programs have a switch to display a help message, but
1) you can't rely on it
2) what switch is used to display that message will differ
3) a lot of programs will display it in a separate window (message box) and not in the cmd window which makes it difficult to determine with a batch code
I strongly recommend you to read the documentation for each of these programs instead.
Regards
aGerman
1) you can't rely on it
2) what switch is used to display that message will differ
3) a lot of programs will display it in a separate window (message box) and not in the cmd window which makes it difficult to determine with a batch code
I strongly recommend you to read the documentation for each of these programs instead.
Regards
aGerman
Re: Batch file to Check if .exe file has a command line swit
While helping in another thread on the forum about command line switches for Windows Update I found another program by Microsoft that may help.
http://technet.microsoft.com/en-us/sysi ... 97439.aspx
Found this thread that uses it with the Windows update client.
http://www.msfn.org/board/topic/143031- ... there-any/
But automating it like you are trying to do may be impossible.
Edit:
another one is BinText but it is a gui.
http://technet.microsoft.com/en-us/sysi ... 97439.aspx
Found this thread that uses it with the Windows update client.
http://www.msfn.org/board/topic/143031- ... there-any/
But automating it like you are trying to do may be impossible.
Edit:
another one is BinText but it is a gui.