From 43de90c7cd21f4c7a5a0d17e7f564160205ebdf4 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Wed, 26 Oct 2022 23:18:42 +0200 Subject: [PATCH] Fixes --- Winget-AutoUpdate/Winget-Upgrade.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Winget-AutoUpdate/Winget-Upgrade.ps1 b/Winget-AutoUpdate/Winget-Upgrade.ps1 index f5ff4ac..f584bbf 100644 --- a/Winget-AutoUpdate/Winget-Upgrade.ps1 +++ b/Winget-AutoUpdate/Winget-Upgrade.ps1 @@ -169,6 +169,7 @@ if (Test-Network) { if ($IsSystem -and $UserScheduledTask) { #Get Winget system apps to excape them befor running user context + Write-Log "Get list of installed Winget apps in System context..." Get-WingetSystemApps #Run user context scheduled task @@ -176,6 +177,9 @@ if (Test-Network) { Start-ScheduledTask $UserScheduledTask.TaskName -ErrorAction SilentlyContinue Exit 0 } + elseif (!$UserScheduledTask){ + Write-Log "User context execution not installed" + } } }