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