[SOLVED] Problem with the new Microsoft Edge package
Published: Dec 3, 2024 - 10:38
Good morning
I noticed that you modified the Microsoft Edge package by adding
with the following for loop on ps_scheduled_tasks.
The problem is that I already have scheduled task management by another package, which deletes tasks starting with "MicrosoftEdgeUpdate".
So the Edge package crashes because the "ps_scheduled_tasks" variable is empty.
We should add an 'if':
Sincerely
Tom
I noticed that you modified the Microsoft Edge package by adding
Code: Select all
ps_scheduled_tasks = run_powershell(f'Get-ScheduledTask -TaskPath \ | Where-Object TaskName -Like "MicrosoftEdgeUpdate*"')The problem is that I already have scheduled task management by another package, which deletes tasks starting with "MicrosoftEdgeUpdate".
So the Edge package crashes because the "ps_scheduled_tasks" variable is empty.
We should add an 'if':
Code: Select all
ps_scheduled_tasks = run_powershell(f'Get-ScheduledTask -TaskPath \ | Where-Object TaskName -Like "MicrosoftEdgeUpdate*"')
if ps_scheduled_tasks:
# Stopping application scheduled tasks
for tasks in ps_scheduled_tasks:
curr_task_name = tasks['TaskName']
try:
run(rf'schtasks /end /tn "{curr_task_name}"')
except:
print(f"Unable to stop the task_name: {curr_task_name}")Tom