Start PowerToys Run through the ActionRunner (#12043)

This commit is contained in:
Mykhailo Pylyp
2021-07-01 12:26:58 +03:00
committed by GitHub
parent 086394d455
commit b42eb08ec6
2 changed files with 14 additions and 11 deletions

View File

@@ -243,7 +243,18 @@ public:
}
else
{
Logger::error(L"Failed to start the process");
Logger::warn(L"RunNonElevatedEx() failed. Trying fallback");
std::wstring action_runner_path = get_module_folderpath() + L"\\PowerToys.ActionRunner.exe";
std::wstring newParams = L"-run-non-elevated -target modules\\launcher\\PowerLauncher.exe " + params;
if (run_non_elevated(action_runner_path, newParams, nullptr))
{
processStarted = true;
Logger::trace("Started PowerToys Run Process");
}
else
{
Logger::warn("Failed to start PowerToys Run");
}
}
}
}