Launch a .exe from a batch file
Solved
simac
-
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++.
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++.