mirror of
https://github.com/microsoft/PowerToys
synced 2025-09-02 23:45:11 +00:00
[Installer] add priority settings to the task scheduler PT task. (#27058)
* Installer: add priority settings to the task scheduler PT task. * Add priority settings for task creation (for Task Scheduler) to the runner as well * Modifying priority value
This commit is contained in:
@@ -389,6 +389,8 @@ UINT __stdcall CreateScheduledTaskCA(MSIHANDLE hInstall)
|
|||||||
ExitOnFailure(hr, "Cannot put_ExecutionTimeLimit setting info: %x", hr);
|
ExitOnFailure(hr, "Cannot put_ExecutionTimeLimit setting info: %x", hr);
|
||||||
hr = pSettings->put_DisallowStartIfOnBatteries(VARIANT_FALSE);
|
hr = pSettings->put_DisallowStartIfOnBatteries(VARIANT_FALSE);
|
||||||
ExitOnFailure(hr, "Cannot put_DisallowStartIfOnBatteries setting info: %x", hr);
|
ExitOnFailure(hr, "Cannot put_DisallowStartIfOnBatteries setting info: %x", hr);
|
||||||
|
hr = pSettings->put_Priority(4);
|
||||||
|
ExitOnFailure(hr, "Cannot put_Priority setting info : %x", hr);
|
||||||
|
|
||||||
// ------------------------------------------------------
|
// ------------------------------------------------------
|
||||||
// Get the trigger collection to insert the logon trigger.
|
// Get the trigger collection to insert the logon trigger.
|
||||||
|
@@ -140,6 +140,8 @@ bool create_auto_start_task_for_this_user(bool runElevated)
|
|||||||
ExitOnFailure(hr, "Cannot put_ExecutionTimeLimit setting info: %x", hr);
|
ExitOnFailure(hr, "Cannot put_ExecutionTimeLimit setting info: %x", hr);
|
||||||
hr = pSettings->put_DisallowStartIfOnBatteries(VARIANT_FALSE);
|
hr = pSettings->put_DisallowStartIfOnBatteries(VARIANT_FALSE);
|
||||||
ExitOnFailure(hr, "Cannot put_DisallowStartIfOnBatteries setting info: %x", hr);
|
ExitOnFailure(hr, "Cannot put_DisallowStartIfOnBatteries setting info: %x", hr);
|
||||||
|
hr = pSettings->put_Priority(4);
|
||||||
|
ExitOnFailure(hr, "Cannot put_Priority setting info : %x", hr);
|
||||||
|
|
||||||
// ------------------------------------------------------
|
// ------------------------------------------------------
|
||||||
// Get the trigger collection to insert the logon trigger.
|
// Get the trigger collection to insert the logon trigger.
|
||||||
|
Reference in New Issue
Block a user