Skip to content

Commit

Permalink
dont use startupinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
partouf committed Sep 15, 2023
1 parent 1f16b17 commit a97c339
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ DWORD SpawnProcess(const cewrapper::Job &job, STARTUPINFOEX &si, HANDLE hUserTok
else
{
cewrapper::CheckWin32(CreateProcessAsUserW(hUserToken, config.progid.c_str(), cmdline.data(), nullptr, nullptr,
false, NORMAL_PRIORITY_CLASS | CREATE_SUSPENDED, nullptr, nullptr,
&si.StartupInfo, &pi),
false, NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT | CREATE_SUSPENDED,
nullptr, nullptr,
nullptr, &pi),
L"CreateProcessAsUserW");
}

Expand Down Expand Up @@ -128,8 +129,7 @@ DWORD execute_using_lower_rights(const cewrapper::Job &job)
cewrapper::CheckWin32(SaferComputeTokenFromLevel(hAuthzLevel, NULL, &hToken, 0, NULL),
L"SaferComputeTokenFromLevel");

STARTUPINFOEX si;
ZeroMemory(&si, sizeof(STARTUPINFOEX));
STARTUPINFOEX si = {};
si.StartupInfo.cb = sizeof(STARTUPINFOEX);

DWORD app_exit_code = SpawnProcess(job, si, hToken);
Expand Down

0 comments on commit a97c339

Please sign in to comment.