[Runner/common] Fixed two potential issues with CreateProcess (#9063)

* Fixed two potential issues with CreateProcess

* Remove comment
This commit is contained in:
Ivan Stošić
2021-01-14 15:29:12 +01:00
committed by GitHub
parent 11a569b113
commit 655a86694d
2 changed files with 2 additions and 2 deletions

View File

@@ -169,7 +169,7 @@ inline bool run_same_elevation(const std::wstring& file, const std::wstring& par
executable_args += L" " + params;
}
STARTUPINFO si = { 0 };
STARTUPINFO si = { sizeof(STARTUPINFO) };
PROCESS_INFORMATION pi = { 0 };
auto succeeded = CreateProcessW(file.c_str(),
const_cast<LPWSTR>(executable_args.c_str()),

View File

@@ -266,7 +266,7 @@ BOOL run_settings_non_elevated(LPCWSTR executable_path, LPWSTR executable_args,
nullptr,
nullptr,
FALSE,
0,
EXTENDED_STARTUPINFO_PRESENT,
nullptr,
nullptr,
&siex.StartupInfo,