[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:
Laszlo Nemeth 2023-06-30 15:23:02 +02:00 committed by GitHub
parent 148f1df56c
commit 03a5a4200e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -389,6 +389,8 @@ UINT __stdcall CreateScheduledTaskCA(MSIHANDLE hInstall)
ExitOnFailure(hr, "Cannot put_ExecutionTimeLimit setting info: %x", hr);
hr = pSettings->put_DisallowStartIfOnBatteries(VARIANT_FALSE);
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.

View File

@ -140,6 +140,8 @@ bool create_auto_start_task_for_this_user(bool runElevated)
ExitOnFailure(hr, "Cannot put_ExecutionTimeLimit setting info: %x", hr);
hr = pSettings->put_DisallowStartIfOnBatteries(VARIANT_FALSE);
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.