[RISOLTO] Problema con il nuovo pacchetto Microsoft Edge
Pubblicato: 3 dicembre 2024 - 10:38
Buongiorno
Ho notato che hai modificato il pacchetto Microsoft Edge aggiungendo
con il seguente ciclo for su ps_scheduled_tasks.
Il problema è che ho già la gestione delle attività pianificate da un altro pacchetto, che elimina le attività che iniziano con "MicrosoftEdgeUpdate".
Quindi il pacchetto Edge si blocca perché la variabile "ps_scheduled_tasks" è vuota.
Dovremmo aggiungere un 'if':
Sinceramente
Tom
Ho notato che hai modificato il pacchetto Microsoft Edge aggiungendo
Codice: Seleziona tutto
ps_scheduled_tasks = run_powershell(f'Get-ScheduledTask -TaskPath \ | Where-Object TaskName -Like "MicrosoftEdgeUpdate*"')Il problema è che ho già la gestione delle attività pianificate da un altro pacchetto, che elimina le attività che iniziano con "MicrosoftEdgeUpdate".
Quindi il pacchetto Edge si blocca perché la variabile "ps_scheduled_tasks" è vuota.
Dovremmo aggiungere un 'if':
Codice: Seleziona tutto
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