diff --git a/installer/PowerToysSetupCustomActions/CustomAction.cpp b/installer/PowerToysSetupCustomActions/CustomAction.cpp index deb79d756e..3c623049b7 100644 --- a/installer/PowerToysSetupCustomActions/CustomAction.cpp +++ b/installer/PowerToysSetupCustomActions/CustomAction.cpp @@ -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. diff --git a/src/runner/auto_start_helper.cpp b/src/runner/auto_start_helper.cpp index ebe39d01be..7724877cef 100644 --- a/src/runner/auto_start_helper.cpp +++ b/src/runner/auto_start_helper.cpp @@ -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.