Fix #38
This commit is contained in:
parent
08ec57113d
commit
d9890acb42
|
@ -568,12 +568,16 @@ int32_t start_daemon_process() {
|
||||||
wchar_t cmd[MAX_PATH];
|
wchar_t cmd[MAX_PATH];
|
||||||
swprintf(cmd, MAX_PATH, L"espanso.exe daemon");
|
swprintf(cmd, MAX_PATH, L"espanso.exe daemon");
|
||||||
|
|
||||||
|
// Get current espanso directory
|
||||||
|
TCHAR espansoFilePath[MAX_PATH];
|
||||||
|
GetModuleFileName(NULL, espansoFilePath, MAX_PATH);
|
||||||
|
|
||||||
STARTUPINFO si = { sizeof(si) };
|
STARTUPINFO si = { sizeof(si) };
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
|
|
||||||
// Documentation: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw
|
// Documentation: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw
|
||||||
BOOL res = CreateProcess(
|
BOOL res = CreateProcess(
|
||||||
L"./espanso.exe",
|
espansoFilePath,
|
||||||
cmd,
|
cmd,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user