none
How to run .exe using batchfile? RRS feed

  • General discussion

  • I would like to know on how to run .exe using batchfile and I try following code without luck.

    Start /d "C:\Temp\ABC.exe"

    Does anyone have any suggestions?
    Thanks in advance for any suggestions


    Thanks in advance for any suggestions

    • Changed type Bill_Stewart Monday, December 17, 2018 6:34 PM
    • Moved by Bill_Stewart Monday, December 17, 2018 6:34 PM Help vampire
    Tuesday, October 2, 2018 4:48 PM

All replies

  • Just use the pathname of the exe in the bat file:

    C:\Temp\ABC.exe

    Nothing else is needed.


    \_(ツ)_/

    Tuesday, October 2, 2018 4:52 PM
  • The /d is to define the starting directory of the launched process. You will want something like this;

       start /d c:\temp c:\temp\abc.exe

       start c:\temp\abc.exe

       c:\temp\abc.exe

    Note that the start command will initiate the program and then continue to execute the remaining commands in the cmd file. If you just put the exe name in the cmd file, the execution of the cmd will wait until the exe has terminated. 

    Tuesday, October 2, 2018 5:16 PM
  • When I right click the shortcut and see the property, the path is C:\Temp\ABC.exe, once shortcut is clicked, program run, but under cmd, when I type in C:\Temp\ABC.exe, the program does not run.

    Does anyone have any suggestions?
    Thanks, to everyone very much for any suggestions (^v^)


    Thanks in advance for any suggestions

    Tuesday, October 2, 2018 10:07 PM
  • I think you need remedial assistance and training in basic operating system tasks.

    This is not a scripting question.


    -- Bill Stewart [Bill_Stewart]

    Tuesday, October 2, 2018 10:17 PM
  • Contact the developer that wrote c:\temp\abc.exe. The program could be looking for a file in the current directory and you have not specified the correct directory. The program could be expecting some command line parameter. Without access to your system we have no way of knowing what it is doing. 

    Substitute c:\windows\system32\notepad.exe for c:\temp\abc.exe and see if it works. 



    • Edited by MotoX80 Wednesday, October 3, 2018 1:18 AM
    Wednesday, October 3, 2018 12:54 AM