Skip to content

Commit

Permalink
only set desktop for appcontainer exec
Browse files Browse the repository at this point in the history
  • Loading branch information
partouf committed Sep 15, 2023
1 parent 623d72f commit 91ca844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ DWORD SpawnProcess(const cewrapper::Job &job, STARTUPINFOEX &si, HANDLE hUserTok
// https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/165194
wchar_t *desktop = static_cast<wchar_t *>(malloc(64));
lstrcpyW(desktop, L"winsta0\\default");
si.StartupInfo.lpDesktop = desktop;

PROCESS_INFORMATION pi = {};
if (hUserToken == nullptr)
{
si.StartupInfo.lpDesktop = desktop;
cewrapper::CheckWin32(CreateProcessW(config.progid.c_str(), cmdline.data(), nullptr, nullptr, false,
EXTENDED_STARTUPINFO_PRESENT | CREATE_UNICODE_ENVIRONMENT | CREATE_SUSPENDED,
nullptr,
Expand Down

0 comments on commit 91ca844

Please sign in to comment.