I have an EXE file from a Visual Basic application & I would like to
identify the available switches.
Generally, with Microsoft windows EXE files, we can gain access to the
SWITCHES associated with these file.
By typing "Filename.EXE /?" or "Filename.EXE /Help" I can get a list of
all the available switches.
This approach does NOT work with my VisualBasicFile.EXE file.
* Is there another way to identify the switches associates with my EXE
file ?
* Can Microsoft deliberately hide these switches so that "/Help " or "/?"
do NOT show any results ?
* Appreciate any references to study this issue a bit more
Thanks
JoJo
There's no built in /? switch. It's just traditionally
added when switches are available. An EXE does not
necessarily have switches. They have to be deliberately
added.
If you don't have the VB code and the author didn't
provide any information, there's no way to find switches...
and there may not be any. The only chance you might
have would be to sift through the binary for hard-coded
strings like -e or /e, but even if you find them that doesn't
tell you what they do.
Hi, JoJo
As mayayana said, the EXE may have no help information.
One thing you might try is to read the entire file into a string,
change all non-text characters (Chr0 to Chr31 and Chr 128 to Chr255)
to Chr32 (space), then write the string to a .txt file. Then view the
text file with notepad or some other plain text viewer. Sometimes you
will find useful info and sometimes you don't. Maybe someone will
post a script or regular expression to blank out the non-text
characters.
-Paul Randall
>As mayayana said, the EXE may have no help information.
>One thing you might try is to read the entire file into a string,
>change all non-text characters (Chr0 to Chr31 and Chr 128 to Chr255)
>to Chr32 (space), then write the string to a .txt file. Then view the
>text file with notepad or some other plain text viewer. Sometimes you
>will find useful info and sometimes you don't. Maybe someone will
>post a script or regular expression to blank out the non-text
>characters.
>
>-Paul Randall
>
Peek.com is 960 bytes and useful for this Paul.
PEEK
reads the text parts of any file, even with extensions like
EXE, COM, OVR, OBJ, HLP, BAS, BIN, DEF, FMT, DBF, SYS etc.
It will also read text files: TXT, DOC, DAT, LST etc.
It ignores graphic characters and omits empty lines.
Correct syntax is PEEK [/p] filename.ext [>newfile.ext]
Optional switches: /p displays one screen at a time
(may be anywhere /w forces WordStar interpretation
on command line) (normally automatic)
The output may be redirected into a disk file ( newfile.ext
above ) and edited and/or printed out.
If you have forgotten what a program does, or its syntax, you
will generally find in the PEEK output:
1) The origin and author of the program
2) Any Help messages
3) Clues to syntax, special switches, etc.
Jan Machacek Autelco Ltd., 103 London Road,
March 1989 Staines, Middx. TW18 4HN
--
Posted via a free Usenet account from http://www.teranews.com
>On Sat, 15 Mar 2008 10:46:46 -0600, "Paul Randall" <paul...@cableone.net>
>wrote:
>
>>As mayayana said, the EXE may have no help information.
>>One thing you might try is to read the entire file into a string,
>>change all non-text characters (Chr0 to Chr31 and Chr 128 to Chr255)
>>to Chr32 (space), then write the string to a .txt file.
>Peek.com is 960 bytes and useful for this Paul.
A script for this could be shorter. With the output in an IE window.
Giovanni.
--
Giovanni Cenati (Bergamo, Italy)
Write to user "Reventlov" and domain at katamail com
http://digilander.libero.it/Cenati (Esempi e programmi in VbScript)
--
Google for strings.exe and run that on your exe. Then you will have to
have a bit of luck to decipher what everything means. Process explorer
will also list strings contained within running processes.
~JasonG
--
That would mean that /? and /Help are not switches that your VisualBasicFile.EXE
recognizes when it parses a command line. Since it is your VisualBasicFile.EXE,
you are the one to do something about that.