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


  1. Posts : 8
    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 ComputerSystem Spec

  2. dalchina's Avatar
    Posts : 19,902
    Win 10 Pro (1903)
       #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 ComputersSystem Spec


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

    dalchina said: View Post
    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; 4 Weeks Ago at 02:44.
      My ComputerSystem Spec

  4. Berton's Avatar
    Posts : 5,968
    Win10 Home and Pro, Win10 Insider Preview, WinXP Home Premium, Linux Mint, Win7 Pro
       #4

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


 

Related Threads
Customization Shell Commands List for Windows 10 in Tutorials
Complete List of Windows 10 Shell Commands A shell command can be typed in the Run (Windows+R) dialog, search, File Explorer address bar, and Internet Explorer address bar to open a Windows shell folder. This tutorial will show you a...
General Tips Rundll32 Commands List for Windows 10 in Tutorials
List of Rundll32 Commands in Windows 10 Windows Rundll32 commands loads and runs 32-bit dynamic-link libraries (DLLs) that can be used for directly invoking specified functions, or used to create shortcuts with. This tutorial will provide...
I have my old OS drive connected to a new drive and clean install. I'd like my GOM jumplist history back. Where is it located please? Google has failed me :confused: TIA
I have found a couple of scripts for the registry that supposedly can control How Many files can be shown in the Quick Access space at once with a limit of close to 60. Normal display is more like 15. This has led me to hope that there might be a...
Apps & Features App Commands List for Windows 10 in Tutorials
List of Commands to Open Microsoft Store Apps in Windows 10 This tutorial will provide you with a list of Uniform Resource Identifier (URI) commands to open specific Windows 10 Store apps via the command prompt, Run (Win+R) dialog, and scripts....
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 15:05.
Find Us