From 0e955c819a5747725d856c3c885551bd9b358f19 Mon Sep 17 00:00:00 2001 From: Peter Repukat Date: Sun, 2 Oct 2022 20:22:14 +0200 Subject: [PATCH] GlosSITarget: Fix freeze if installed in a path that contains spaces --- GlosSITarget/AppLauncher.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GlosSITarget/AppLauncher.cpp b/GlosSITarget/AppLauncher.cpp index 771ab86..4ed9ec0 100644 --- a/GlosSITarget/AppLauncher.cpp +++ b/GlosSITarget/AppLauncher.cpp @@ -132,7 +132,8 @@ void AppLauncher::launchWatchdog() GetModuleFileNameA(GetModuleHandle(NULL), buff, MAX_PATH); const std::string glossipath(buff); // hack to start a TRULY detached process... - system(("start " + (glossipath.substr(0, 1 + glossipath.find_last_of(L'\\')) + "GlosSIWatchdog.exe")).data()); + const auto launchString = ("start /b cmd.exe /c \"" + (glossipath.substr(0, 1 + glossipath.find_last_of(L'\\')) + "GlosSIWatchdog.exe" + "\"")); + system(launchString.data()); } #ifdef _WIN32