From 08bd0bc60edeedcb988ca0fac0c6f6257910b142 Mon Sep 17 00:00:00 2001 From: Joerg Hochwald Date: Tue, 25 Oct 2022 17:18:58 +0200 Subject: [PATCH 1/5] ARM64 workarounds --- Winget-AutoUpdate/functions/Get-WingetCmd.ps1 | 6 ++-- Winget-AutoUpdate/functions/Test-Network.ps1 | 35 ++++++++++--------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/Winget-AutoUpdate/functions/Get-WingetCmd.ps1 b/Winget-AutoUpdate/functions/Get-WingetCmd.ps1 index b92b467..0dddf0a 100644 --- a/Winget-AutoUpdate/functions/Get-WingetCmd.ps1 +++ b/Winget-AutoUpdate/functions/Get-WingetCmd.ps1 @@ -3,7 +3,9 @@ Function Get-WingetCmd { #Get WinGet Path (if admin context) - $ResolveWingetPath = Resolve-Path "$env:ProgramFiles\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe" | Sort-Object { [version]($_.Path -replace '^[^\d]+_((\d+\.)*\d+)_.*', '$1') } + # Includes Workaround for ARM64 (removed X64 and replaces it with a wildcard) + $ResolveWingetPath = Resolve-Path "$env:ProgramFiles\WindowsApps\Microsoft.DesktopAppInstaller_*_*__8wekyb3d8bbwe" | Sort-Object { [version]($_.Path -replace '^[^\d]+_((\d+\.)*\d+)_.*', '$1') } + if ($ResolveWingetPath) { #If multiple version, pick last one $WingetPath = $ResolveWingetPath[-1].Path @@ -29,7 +31,7 @@ Function Get-WingetCmd { #Log Winget installed version $WingetVer = & $Winget --version Write-Log "Winget Version: $WingetVer" - + return $true } diff --git a/Winget-AutoUpdate/functions/Test-Network.ps1 b/Winget-AutoUpdate/functions/Test-Network.ps1 index 459e6bf..9d326e3 100644 --- a/Winget-AutoUpdate/functions/Test-Network.ps1 +++ b/Winget-AutoUpdate/functions/Test-Network.ps1 @@ -1,55 +1,58 @@ #Function to check connectivity function Test-Network { - + #Init $timeout = 0 + # Workaround for ARM64 (Access Denied / Win32 internal Server error) + $ProgressPreference = 'SilentlyContinue' + #Test connectivity during 30 min then timeout Write-Log "Checking internet connection..." "Yellow" While ($timeout -lt 1800) { $URLtoTest = "https://raw.githubusercontent.com/Romanitho/Winget-AutoUpdate/main/LICENSE" $URLcontent = ((Invoke-WebRequest -URI $URLtoTest -UseBasicParsing).content) - + if ($URLcontent -like "*MIT License*") { - + Write-Log "Connected !" "Green" #Check for metered connection [void][Windows.Networking.Connectivity.NetworkInformation, Windows, ContentType = WindowsRuntime] $cost = [Windows.Networking.Connectivity.NetworkInformation]::GetInternetConnectionProfile().GetConnectionCost() - + if ($cost.ApproachingDataLimit -or $cost.OverDataLimit -or $cost.Roaming -or $cost.BackgroundDataUsageRestricted -or ($cost.NetworkCostType -ne "Unrestricted")) { - + Write-Log "Metered connection detected." "Yellow" - + if ($WAUConfig.WAU_DoNotRunOnMetered -eq 1) { - + Write-Log "WAU is configured to bypass update checking on metered connection" return $false - + } else { - + Write-Log "WAU is configured to force update checking on metered connection" return $true - + } - + } else { return $true } - + } else { Start-Sleep 10 $timeout += 10 - + #Send Warning Notif if no connection for 5 min if ($timeout -eq 300) { Write-Log "Notify 'No connection' sent." "Yellow" @@ -59,11 +62,11 @@ function Test-Network { $Balise = "connection" Start-NotifTask $Title $Message $MessageType $Balise } - + } - + } - + #Send Timeout Notif if no connection for 30 min Write-Log "Timeout. No internet connection !" "Red" $Title = $NotifLocale.local.outputs.output[1].title From b9602d8b607543891620a36026063300ad0c642f Mon Sep 17 00:00:00 2001 From: Joerg Hochwald Date: Tue, 25 Oct 2022 17:33:46 +0200 Subject: [PATCH 2/5] Add some more Blocked Apps Microsoft.WindowsVirtualDesktopBootloader On Windows 365, causes issues Microsoft.WindowsSDK Cause issues Microsoft.VCRedist.2019.arm64 Cause a loop --- excluded_apps_further.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 excluded_apps_further.txt diff --git a/excluded_apps_further.txt b/excluded_apps_further.txt new file mode 100644 index 0000000..df7a227 --- /dev/null +++ b/excluded_apps_further.txt @@ -0,0 +1,14 @@ +Microsoft.WindowsVirtualDesktopBootloader +Microsoft.WindowsSDK +Microsoft.VCRedist.2019.arm64 +Google.Chrome +Microsoft.Edge +Microsoft.EdgeWebView2Runtime +Microsoft.Office +Microsoft.OneDrive +Microsoft.Teams +Mozilla.Firefox +Mozilla.Firefox.DeveloperEdition +Mozilla.Firefox.ESR +TeamViewer.TeamViewer +TeamViewer.TeamViewer.Host From b08a4d0bb5dd9d355bd6818c77c09c474cc436de Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Tue, 25 Oct 2022 17:58:53 +0200 Subject: [PATCH 3/5] v1.15.3 --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0db8ac2..8377d6a 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,9 @@ Use White List instead of Black List. This setting will not create the "excluded **-ListPath** Get Black/White List from Path (URL/UNC/Local) (copy/download to Winget-AutoUpdate installation location if external list is newer). +**-InstallUserContext** +Install WAU with system and **user** context executions (From version 1.15.3) + **-BypassListForUsers** Bypass Black/White list when run in user context (From version 1.15.0) From c1c5f0f43876d788569da93a845120e5b71de541 Mon Sep 17 00:00:00 2001 From: Joerg Hochwald Date: Tue, 25 Oct 2022 18:58:41 +0200 Subject: [PATCH 4/5] Update translation Update some German translation --- Winget-AutoUpdate/locale/de.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Winget-AutoUpdate/locale/de.xml b/Winget-AutoUpdate/locale/de.xml index 50e79a9..02a0070 100644 --- a/Winget-AutoUpdate/locale/de.xml +++ b/Winget-AutoUpdate/locale/de.xml @@ -32,23 +32,23 @@ - Logs are not available yet! + Die Logs sind aktuell nicht verfügbar! - Starting a manual check for updated apps... + Starte die manuelle Suche nach Updates. - Couldn't start a manual check for updated apps! + Die manuelle Suche nach Updates konnte nicht gestartet werden! - Check for updated apps already running... + Die Such nach Updates läuft bereits. - Manual check for updated apps completed... + Die manuelle suche nach Updates wurde abgeschlossen. From 837a521a969fbd984d369cfbbb906f05bc346b5c Mon Sep 17 00:00:00 2001 From: Joerg Hochwald Date: Wed, 26 Oct 2022 13:50:44 +0200 Subject: [PATCH 5/5] removed To prevent any further misunderstandings --- excluded_apps_further.txt | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 excluded_apps_further.txt diff --git a/excluded_apps_further.txt b/excluded_apps_further.txt deleted file mode 100644 index df7a227..0000000 --- a/excluded_apps_further.txt +++ /dev/null @@ -1,14 +0,0 @@ -Microsoft.WindowsVirtualDesktopBootloader -Microsoft.WindowsSDK -Microsoft.VCRedist.2019.arm64 -Google.Chrome -Microsoft.Edge -Microsoft.EdgeWebView2Runtime -Microsoft.Office -Microsoft.OneDrive -Microsoft.Teams -Mozilla.Firefox -Mozilla.Firefox.DeveloperEdition -Mozilla.Firefox.ESR -TeamViewer.TeamViewer -TeamViewer.TeamViewer.Host