1

I have a bat file that starts an .exe file, however, the cmd.exe does not close after the command is executed.

start /d "C:\projects" myProgram.exe

The program starts and behaves as it should, but the cmd wont close. What could be the cause of this?

Michael
  • 175
  • 1
  • 1
  • 12
  • I have had this problem before and an exit command of some sort is needed if i'm right. – dragonloverlord Nov 04 '14 at 11:44
  • There's nothing wrong with the command you've provided. You'll need to provide the means by which you're invoking the command (like the batch file or how the CMD window gets opened in the first place). – mojo Nov 04 '14 at 13:51

1 Answers1

0

Try using EXIT in your script link to more info

For example:

EXIT
dragonloverlord
  • 442
  • 5
  • 21
  • 1
    `EXIT /B` will only exit the cmd.exe shell if executed from the command line. It will not exit cmd.exe if executed within a batch script. `EXIT` will always exit cmd.exe, even if within a script. – dbenham Nov 04 '14 at 14:54
  • Sorry about the error but I do not normally use a windows computer and could not immediately test it so your help is much appreciated :) – dragonloverlord Nov 04 '14 at 16:11