Create a batch file to run an .exe with an additional parameter

后端 未结 3 2041
借酒劲吻你
借酒劲吻你 2020-12-15 04:08

I need a batch file which will do the following:

1. Open CMD and navigate to a location C:/Users/...../program.exe
2. Run the program.exe with an additional          


        
3条回答
  •  情话喂你
    2020-12-15 04:19

    in batch file abc.bat

    cd c:\user\ben_dchost\documents\
    executible.exe -flag1 -flag2 -flag3 
    

    I am assuming that your executible.exe is present in c:\user\ben_dchost\documents\ I am also assuming that the parameters it takes are -flag1 -flag2 -flag3

    Edited:

    For the command you say you want to execute, do:

    cd C:\Users\Ben\Desktop\BGInfo\
    bginfo.exe dc_bginfo.bgi
    pause
    

    Hope this helps

提交回复
热议问题