Prevent new window opening with CreateProcess()

Executing commands (like "adb push") created a new terminal window on
Windows. Avoid it.
This commit is contained in:
Romain Vimont 2018-02-15 22:42:37 +01:00
parent e8cad790a4
commit 518d6d5dcd

View file

@ -20,7 +20,7 @@ HANDLE cmd_execute(const char *path, const char *const argv[]) {
return NULL;
}
if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi)) {
return NULL;
}