mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-01 09:59:06 +08:00
Fix Runner stealing shortcuts on older Win10 (#9744)
This commit is contained in:
parent
666b4e5964
commit
ee45c39d65
@ -202,11 +202,18 @@ public:
|
||||
sei.lpFile = L"modules\\launcher\\PowerLauncher.exe";
|
||||
sei.nShow = SW_SHOWNORMAL;
|
||||
sei.lpParameters = executable_args.data();
|
||||
ShellExecuteExW(&sei);
|
||||
|
||||
if (ShellExecuteExW(&sei))
|
||||
{
|
||||
m_enabled = true;
|
||||
m_hProcess = sei.hProcess;
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger::error("Launcher failed to start");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::wstring action_runner_path = get_module_folderpath();
|
||||
|
||||
@ -231,6 +238,7 @@ public:
|
||||
|
||||
if (run_non_elevated(action_runner_path, params, pidBuffer))
|
||||
{
|
||||
m_enabled = true;
|
||||
const int maxRetries = 80;
|
||||
for (int retry = 0; retry < maxRetries; ++retry)
|
||||
{
|
||||
@ -248,8 +256,6 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_enabled = true;
|
||||
}
|
||||
|
||||
// Disable the powertoy
|
||||
|
Loading…
Reference in New Issue
Block a user