How to find out the list of commands for a .bat or .exe file?


  1. Posts : 181
    10, server 2016, server2012
       #1

    How to find out the list of commands for a .bat or .exe file?


    hard to describe what im looking for i'll do my best to explain in details.

    example, an image software I use photo.exe when installed it automatically set up shell in registry for windows context menu for files type .bmp/.jpg etc etc.

    when viewed in registry/shell it show something like these:

    1. "C:\photos\photos.exe" /e "%1" - for opening .bmp/jpg
    2. "C:\photos\photos.exe" /p "%1" - for printing photos
    3. "C:\photos\photos.exe" /v "%1" - another view mode

    the commands /e /p /v etc is what I am looking for. I know the program has more of these because it has other functions within the program itself such as converting picture format, reduce in size, rotation etc.

    I tried few guesses such as /c /cn for something I thought maybe conversion but no luck

    is there a way to figure out what sort of command line it has available for a particular program?
      My Computer


  2. Posts : 42,983
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    How do you discover the command line options?

    A particular program may or may not implement command line switches.
    Usually research is needed if you want the detail. For example, explorer.exe has command line switches- you have to search for the information.
    Explorer.exe - Windows CMD - SS64.com

    Here (at a command prompt)
    explorer.exe + any of /? /h /help - the usual options to get help on command line syntax - is of no use.

    Here's how vlc player behaves:
    VLC command-line help - VideoLAN Wiki

    (I searched for
    command line switches vlc player
    )

    Example: at a command prompt
    <path>\vlc.exe -h
    results in
    Dumped content to vlc-help.txt file.

    Press the RETURN key to continue…

    For better supported programs this info is relatively easy to find.

    In some cases the information is in the Help documentation provided with the program.

    Discussion and more:
    executable - How can I find out if an .EXE has Command-Line Options? - Stack Overflow

    bat files: you actually have access to the source code by definition. So if nothing documented or in comments, you could examine that.
      My Computers


  3. Posts : 181
    10, server 2016, server2012
    Thread Starter
       #3

    dalchina said:
    How do you discover the command line options?
    A particular program may or may not implement command line switches.
    Usually research is needed if you want the detail. For example, explorer.exe has command line switches- you have to search for the information.
    Explorer.exe - Windows CMD - SS64.com
    Here (at a command prompt)explorer.exe + any of /? /h /help - the usual options to get help on command line syntax - is of no use.
    Here's how vlc player behaves:
    VLC command-line help - VideoLAN Wiki
    (I searched for command line switches vlc player)
    Example: at a command prompt
    <path>\vlc.exe -h
    results in
    Dumped content to vlc-help.txt file.

    Press the RETURN key to continue…

    For better supported programs this info is relatively easy to find.

    In some cases the information is in the Help documentation provided with the program.

    Discussion and more:
    executable - How can I find out if an .EXE has Command-Line Options? - Stack Overflow

    bat files: you actually have access to the source code by definition. So if nothing documented or in comments, you could examine that.
    i found the commands /e /p etc from registry in shell for context menu. i'll give /h or /? a try thanks.

    /h /? /help -h -help no luck. i'll try the process explorer way and also the other suggestion on that page you linked. thanks
    Last edited by m18xr2; 19 Aug 2019 at 02:44.
      My Computer


  4. Posts : 14,018
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #4

    The Command Prompt can still use some of the old DOS commands, maybe even the PowerShell:
    dos commands at DuckDuckGo
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:13.
Find Us




Windows 10 Forums