Launch a .exe from a batch file

Solved
simac -  
 simac -
Hello,

I want to launch an executable (which just does a delay) from a batch file, but since the executable runs with a MS-DOS window, a new DOS window opens but does not "execute" the executable.

I call the executable like this:

START "C:\DOS\Attendre.exe"

And the code for the executable is (in C++):

#include <windows.h>
int main(void)
{
Sleep(1500);
}

Even if I put return 0; after Sleep(1500);, it doesn’t change anything.

Is there an error in one of the programs (even if the C++ code works when I run the executable directly)?

Thank you for your response.

Ps: The C++ code is in Dev-C++.

2 réponses

dubcek Posted messages 18814 Registration date   Status Contributeur Last intervention   5 655
 
hello
remove the start that serves to execute in parallel
C:\DOS\Attendre.exe
0
simac
 
Thank you, that was indeed enough!
0