mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
Fix Runner stealing shortcuts on older Win10 (#9744)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user