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" + } } }