From f3138ffdcf26fe5c276fd84b5fca692cc9ab8d4b Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 11 Oct 2022 16:03:57 +0200 Subject: [PATCH 1/8] Redo --- README.md | 6 ++++ Winget-AutoUpdate-Install.ps1 | 43 +++++++++++++++++++++++++++-- Winget-AutoUpdate/WAU-Uninstall.ps1 | 8 ++++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 01a9f08..deefad4 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,12 @@ Get Black/White List from Path (URL/UNC/Local) (copy/download to Winget-AutoUpda **-NoClean** Keep critical files when installing/uninstalling. This setting will keep "excluded_apps.txt", "included_apps.txt", "mods" and "logs" as they were. +**-DesktopShortcut** +Create a shortcut for user interaction on the Desktop to run task `Winget-AutoUpdate` + +**-StartMenuShortcut** +Create shortcuts for user interaction in the Start Menu to run task `Winget-AutoUpdate`, open Logs and Web Help + **-NotificationLevel** Specify the Notification level: Full (Default, displays all notification), SuccessOnly (Only displays notification for success) or None (Does not show any popup). diff --git a/Winget-AutoUpdate-Install.ps1 b/Winget-AutoUpdate-Install.ps1 index eb175e3..aaf5c40 100644 --- a/Winget-AutoUpdate-Install.ps1 +++ b/Winget-AutoUpdate-Install.ps1 @@ -31,6 +31,12 @@ Remove scheduled tasks and scripts. .PARAMETER NoClean Keep critical files when installing/uninstalling +.PARAMETER DesktopShortcut +Create a shortcut for user interaction on the Desktop to run task "Winget-AutoUpdate" + +.PARAMETER StartMenuShortcut +Create shortcuts for user interaction in the Start Menu to run task "Winget-AutoUpdate", open Logs and Web Help + .PARAMETER NotificationLevel Specify the Notification level: Full (Default, displays all notification), SuccessOnly (Only displays notification for success) or None (Does not show any popup). @@ -56,7 +62,7 @@ Configure WAU to bypass the Black/White list when run in user context .\winget-install-and-update.ps1 -Silent -UseWhiteList .EXAMPLE -.\winget-install-and-update.ps1 -Silent -ListPath https://www.domain.com/WAULists +.\winget-install-and-update.ps1 -Silent -ListPath https://www.domain.com/WAULists -StartMenuShortcut .EXAMPLE .\winget-install-and-update.ps1 -Silent -UpdatesAtLogon -UpdatesInterval Weekly @@ -76,6 +82,8 @@ param( [Parameter(Mandatory = $False)] [Switch] $RunOnMetered = $false, [Parameter(Mandatory = $False)] [Switch] $Uninstall = $false, [Parameter(Mandatory = $False)] [Switch] $NoClean = $false, + [Parameter(Mandatory = $False)] [Switch] $DesktopShortcut = $false, + [Parameter(Mandatory = $False)] [Switch] $StartMenuShortcut = $false, [Parameter(Mandatory = $False)] [Switch] $UseWhiteList = $false, [Parameter(Mandatory = $False)] [ValidateSet("Full", "SuccessOnly", "None")] [String] $NotificationLevel = "Full", [Parameter(Mandatory = $False)] [Switch] $UpdatesAtLogon = $false, @@ -323,12 +331,26 @@ function Install-WingetAutoUpdate { New-ItemProperty $regPath -Name WAU_DoNotRunOnMetered -Value 1 -PropertyType DWord -Force | Out-Null } if ($ListPath){ - New-ItemProperty $regPath -Name ListPath -Value $ListPath -Force | Out-Null + New-ItemProperty $regPath -Name WAU_ListPath -Value $ListPath -Force | Out-Null } if ($BypassListForUsers){ New-ItemProperty $regPath -Name WAU_BypassListForUsers -Value 1 -PropertyType DWord -Force | Out-Null } + #Create Shortcuts + if ($StartMenuShortcut) { + if (!(Test-Path "${env:ProgramData}\Microsoft\Windows\Start Menu\Programs\Winget-AutoUpdate (WAU)")) { + New-Item -ItemType Directory -Force -Path "${env:ProgramData}\Microsoft\Windows\Start Menu\Programs\Winget-AutoUpdate (WAU)" | Out-Null + } + Add-Shortcut "wscript.exe" "${env:ProgramData}\Microsoft\Windows\Start Menu\Programs\Winget-AutoUpdate (WAU)\WAU - Check for updated Apps.lnk" "`"$($WingetUpdatePath)\Invisible.vbs`" `"powershell.exe -NoProfile -ExecutionPolicy Bypass -File `"`"`"$($WingetUpdatePath)\user-run.ps1`"`"" "${env:SystemRoot}\System32\shell32.dll,-16739" "Manual start of Winget-AutoUpdate (WAU)..." + Add-Shortcut "wscript.exe" "${env:ProgramData}\Microsoft\Windows\Start Menu\Programs\Winget-AutoUpdate (WAU)\WAU - Open logs.lnk" "`"$($WingetUpdatePath)\Invisible.vbs`" `"powershell.exe -NoProfile -ExecutionPolicy Bypass -File `"`"`"$($WingetUpdatePath)\user-run.ps1`" -Logs`"" "${env:SystemRoot}\System32\shell32.dll,-16763" "Open existing WAU logs..." + Add-Shortcut "wscript.exe" "${env:ProgramData}\Microsoft\Windows\Start Menu\Programs\Winget-AutoUpdate (WAU)\WAU - Web Help.lnk" "`"$($WingetUpdatePath)\Invisible.vbs`" `"powershell.exe -NoProfile -ExecutionPolicy Bypass -File `"`"`"$($WingetUpdatePath)\user-run.ps1`" -Help`"" "${env:SystemRoot}\System32\shell32.dll,-24" "Help for WAU..." + } + + if ($DesktopShortcut) { + Add-Shortcut "wscript.exe" "${env:Public}\Desktop\WAU - Check for updated Apps.lnk" "`"$($WingetUpdatePath)\Invisible.vbs`" `"powershell.exe -NoProfile -ExecutionPolicy Bypass -File `"`"`"$($WingetUpdatePath)\user-run.ps1`"`"" "${env:SystemRoot}\System32\shell32.dll,-16739" "Manual start of Winget-AutoUpdate (WAU)..." + } + Write-host "WAU Installation succeeded!" -ForegroundColor Green Start-sleep 1 @@ -366,6 +388,14 @@ function Uninstall-WingetAutoUpdate { & reg delete "HKCR\AppUserModelId\Windows.SystemToast.Winget.Notification" /f | Out-Null & reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate" /f | Out-Null + if ((Test-Path "${env:ProgramData}\Microsoft\Windows\Start Menu\Programs\Winget-AutoUpdate (WAU)")) { + Remove-Item -Path "${env:ProgramData}\Microsoft\Windows\Start Menu\Programs\Winget-AutoUpdate (WAU)" -Recurse -Force | Out-Null + } + + if ((Test-Path "${env:Public}\Desktop\WAU - Check for updated Apps.lnk")) { + Remove-Item -Path "${env:Public}\Desktop\WAU - Check for updated Apps.lnk" -Force | Out-Null + } + Write-host "Uninstallation succeeded!" -ForegroundColor Green Start-sleep 1 } @@ -417,6 +447,15 @@ function Start-WingetAutoUpdate { } } +function Add-Shortcut ($Target, $Shortcut, $Arguments, $Icon, $Description) { + $WScriptShell = New-Object -ComObject WScript.Shell + $Shortcut = $WScriptShell.CreateShortcut($Shortcut) + $Shortcut.TargetPath = $Target + $Shortcut.Arguments = $Arguments + $Shortcut.IconLocation = $Icon + $Shortcut.Description = $Description + $Shortcut.Save() +} <# MAIN #> diff --git a/Winget-AutoUpdate/WAU-Uninstall.ps1 b/Winget-AutoUpdate/WAU-Uninstall.ps1 index 8189dff..f0c95e1 100644 --- a/Winget-AutoUpdate/WAU-Uninstall.ps1 +++ b/Winget-AutoUpdate/WAU-Uninstall.ps1 @@ -56,6 +56,14 @@ try { & reg delete "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate" /f | Out-Null } + if ((Test-Path "${env:ProgramData}\Microsoft\Windows\Start Menu\Programs\Winget-AutoUpdate (WAU)")) { + Remove-Item -Path "${env:ProgramData}\Microsoft\Windows\Start Menu\Programs\Winget-AutoUpdate (WAU)" -Recurse -Force | Out-Null + } + + if ((Test-Path "${env:Public}\Desktop\WAU - Check for updated Apps.lnk")) { + Remove-Item -Path "${env:Public}\Desktop\WAU - Check for updated Apps.lnk" -Force | Out-Null + } + Write-host "Uninstallation succeeded!" -ForegroundColor Green } else { From e9097d578dc0923f57fadc567d6676205f459e95 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 11 Oct 2022 16:23:31 +0200 Subject: [PATCH 2/8] Nearing... --- Winget-AutoUpdate/functions/Get-NotifLocale.ps1 | 7 +++++++ Winget-AutoUpdate/locale/en.xml | 12 ++++++++++++ Winget-AutoUpdate/locale/sv.xml | 12 ++++++++++++ 3 files changed, 31 insertions(+) diff --git a/Winget-AutoUpdate/functions/Get-NotifLocale.ps1 b/Winget-AutoUpdate/functions/Get-NotifLocale.ps1 index 24b75e0..386409d 100644 --- a/Winget-AutoUpdate/functions/Get-NotifLocale.ps1 +++ b/Winget-AutoUpdate/functions/Get-NotifLocale.ps1 @@ -22,6 +22,13 @@ Function Get-NotifLocale { #Get locale XML file content [xml]$Script:NotifLocale = Get-Content $LocaleFile -Encoding UTF8 -ErrorAction SilentlyContinue + #Test if new strings exist in $LocaleFile + if ($null -eq $NotifLocale.local.outputs.output[7].message){ + $LocaleFile = "$WorkingDir\locale\en.xml" + #Get locale XML file content + [xml]$Script:NotifLocale = Get-Content $LocaleFile -Encoding UTF8 -ErrorAction SilentlyContinue + } + #Rerturn langague display name Return $LocaleDisplayName diff --git a/Winget-AutoUpdate/locale/en.xml b/Winget-AutoUpdate/locale/en.xml index d9c7554..6a2799c 100644 --- a/Winget-AutoUpdate/locale/en.xml +++ b/Winget-AutoUpdate/locale/en.xml @@ -30,5 +30,17 @@ Please contact support. + + + Logs are not available yet! + + + + Starting a manual check for updated apps... + + + + Couldn't start a manual check for updated apps! + diff --git a/Winget-AutoUpdate/locale/sv.xml b/Winget-AutoUpdate/locale/sv.xml index 7371bb3..3a2ab29 100644 --- a/Winget-AutoUpdate/locale/sv.xml +++ b/Winget-AutoUpdate/locale/sv.xml @@ -30,5 +30,17 @@ Vänligen kontakta supporten. + + + Loggarna är inte tillgängliga ännu! + + + + Startar en manuell koll efter uppdaterade appar... + + + + Kunde inte starta en manuell koll efter uppdaterade appar! + From 9c75bf102211f1cfc7b6039c78a955942df6fa7b Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 11 Oct 2022 16:55:17 +0200 Subject: [PATCH 3/8] End --- .../functions/Start-NotifTask.ps1 | 2 +- Winget-AutoUpdate/user-run.ps1 | 73 +++++++++++++++++++ Winget-AutoUpdate/winget-upgrade.ps1 | 12 +-- 3 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 Winget-AutoUpdate/user-run.ps1 diff --git a/Winget-AutoUpdate/functions/Start-NotifTask.ps1 b/Winget-AutoUpdate/functions/Start-NotifTask.ps1 index b505e0d..c252cf9 100644 --- a/Winget-AutoUpdate/functions/Start-NotifTask.ps1 +++ b/Winget-AutoUpdate/functions/Start-NotifTask.ps1 @@ -2,7 +2,7 @@ function Start-NotifTask ($Title, $Message, $MessageType, $Balise, $OnClickAction) { - if (($WAUConfig.WAU_NotificationLevel -eq "Full") -or ($WAUConfig.WAU_NotificationLevel -eq "SuccessOnly" -and $MessageType -eq "Success")) { + if (($WAUConfig.WAU_NotificationLevel -eq "Full") -or ($WAUConfig.WAU_NotificationLevel -eq "SuccessOnly" -and $MessageType -eq "Success") -or ($userrun)) { #Prepare OnClickAction (if set) if ($OnClickAction){ diff --git a/Winget-AutoUpdate/user-run.ps1 b/Winget-AutoUpdate/user-run.ps1 new file mode 100644 index 0000000..9db8f7d --- /dev/null +++ b/Winget-AutoUpdate/user-run.ps1 @@ -0,0 +1,73 @@ +<# +.SYNOPSIS +Handle user interaction from shortcuts and show a Toast + +.DESCRIPTION +Act on shortcut run (DEFAULT: Check for updated Apps) + +.PARAMETER Logs +Open the Log file from Winget-AutoUpdate installation location + +.PARAMETER Help +Open the Web Help page +https://github.com/Romanitho/Winget-AutoUpdate + +.EXAMPLE +.\user-run.ps1 -Logs + +#> + +[CmdletBinding()] +param( + [Parameter(Mandatory=$False)] [Switch] $Logs = $false, + [Parameter(Mandatory=$False)] [Switch] $Help = $false +) + +<# MAIN #> + +#Get Working Dir +$Script:WorkingDir = $PSScriptRoot + +#Load functions +. $PSScriptRoot\functions\Get-NotifLocale.ps1 +. $PSScriptRoot\functions\Start-NotifTask.ps1 + +#Set common variables +$OnClickAction = "$PSScriptRoot\logs\updates.log" +$Title = "Winget-AutoUpdate (WAU)" +$Balise = "Winget-AutoUpdate (WAU)" +$userrun = $True + +#Get Toast Locale function +Get-NotifLocale + +if ($Logs) { + if ((Test-Path "$PSScriptRoot\logs\updates.log")) { + Invoke-Item "$PSScriptRoot\logs\updates.log" + } + else { + #Not available yet + $Message = $NotifLocale.local.outputs.output[5].message + $MessageType = "warning" + Start-NotifTask $Title $Message $MessageType $Balise + } +} +elseif ($Help) { + Start-Process "https://github.com/Romanitho/Winget-AutoUpdate" +} +else { + try { + #Run scheduled task + Get-ScheduledTask -TaskName "Winget-AutoUpdate" -ErrorAction Stop | Start-ScheduledTask -ErrorAction Stop + #Starting check - Send notification + $Message = $NotifLocale.local.outputs.output[6].message + $MessageType = "info" + Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction + } + catch { + #Check failed - Just send notification + $Message = $NotifLocale.local.outputs.output[7].message + $MessageType = "error" + Start-NotifTask $Title $Message $MessageType $Balise + } +} diff --git a/Winget-AutoUpdate/winget-upgrade.ps1 b/Winget-AutoUpdate/winget-upgrade.ps1 index 624e2aa..79be699 100644 --- a/Winget-AutoUpdate/winget-upgrade.ps1 +++ b/Winget-AutoUpdate/winget-upgrade.ps1 @@ -76,17 +76,17 @@ if (Test-Network) { } #Get External ListPath - if ($WAUConfig.ListPath) { - Write-Log "WAU uses External Lists from $WAUConfig.ListPath" - $NewList = Test-ListPath $WAUConfig.ListPath $WAUConfig.WAU_UseWhiteList $WAUConfig.InstallLocation + if ($WAUConfig.WAU_ListPath) { + Write-Log "WAU uses External Lists from: $($WAUConfig.WAU_ListPath)" + $NewList = Test-ListPath $WAUConfig.WAU_ListPath $WAUConfig.WAU_UseWhiteList $WAUConfig.InstallLocation if ($NewList) { - Write-Log "Newer List downloaded to local path" + Write-Log "Newer List copied/downloaded to local path: $($WAUConfig.InstallLocation)" "Yellow" } else { - Write-Log "No newer List detected" + Write-Log "List is up to date." "Green" } } - + #Get White or Black list if ($WAUConfig.WAU_UseWhiteList -eq 1) { Write-Log "WAU uses White List config" From 4f7f62a9f692db57c4609b8a2ddee273a5eb7d7f Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 11 Oct 2022 18:04:25 +0200 Subject: [PATCH 4/8] WorkingDir as in NotifLocale --- Winget-AutoUpdate/functions/Start-NotifTask.ps1 | 2 +- Winget-AutoUpdate/user-run.ps1 | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Winget-AutoUpdate/functions/Start-NotifTask.ps1 b/Winget-AutoUpdate/functions/Start-NotifTask.ps1 index c252cf9..f635e6b 100644 --- a/Winget-AutoUpdate/functions/Start-NotifTask.ps1 +++ b/Winget-AutoUpdate/functions/Start-NotifTask.ps1 @@ -2,7 +2,7 @@ function Start-NotifTask ($Title, $Message, $MessageType, $Balise, $OnClickAction) { - if (($WAUConfig.WAU_NotificationLevel -eq "Full") -or ($WAUConfig.WAU_NotificationLevel -eq "SuccessOnly" -and $MessageType -eq "Success") -or ($userrun)) { + if (($WAUConfig.WAU_NotificationLevel -eq "Full") -or ($WAUConfig.WAU_NotificationLevel -eq "SuccessOnly" -and $MessageType -eq "Success") -or ($UserRun)) { #Prepare OnClickAction (if set) if ($OnClickAction){ diff --git a/Winget-AutoUpdate/user-run.ps1 b/Winget-AutoUpdate/user-run.ps1 index 9db8f7d..d122619 100644 --- a/Winget-AutoUpdate/user-run.ps1 +++ b/Winget-AutoUpdate/user-run.ps1 @@ -26,24 +26,24 @@ param( <# MAIN #> #Get Working Dir -$Script:WorkingDir = $PSScriptRoot +$Script:WorkingDir = $WorkingDir #Load functions -. $PSScriptRoot\functions\Get-NotifLocale.ps1 -. $PSScriptRoot\functions\Start-NotifTask.ps1 +. $WorkingDir\functions\Get-NotifLocale.ps1 +. $WorkingDir\functions\Start-NotifTask.ps1 #Set common variables -$OnClickAction = "$PSScriptRoot\logs\updates.log" +$OnClickAction = "$WorkingDir\logs\updates.log" $Title = "Winget-AutoUpdate (WAU)" $Balise = "Winget-AutoUpdate (WAU)" -$userrun = $True +$UserRun = $True #Get Toast Locale function Get-NotifLocale if ($Logs) { - if ((Test-Path "$PSScriptRoot\logs\updates.log")) { - Invoke-Item "$PSScriptRoot\logs\updates.log" + if ((Test-Path "$WorkingDir\logs\updates.log")) { + Invoke-Item "$WorkingDir\logs\updates.log" } else { #Not available yet From 610c7937c256261a29eb59219d74e9963cc1a8e0 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 11 Oct 2022 18:06:21 +0200 Subject: [PATCH 5/8] 2 many replaced... --- Winget-AutoUpdate/user-run.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/user-run.ps1 b/Winget-AutoUpdate/user-run.ps1 index d122619..11a421f 100644 --- a/Winget-AutoUpdate/user-run.ps1 +++ b/Winget-AutoUpdate/user-run.ps1 @@ -26,7 +26,7 @@ param( <# MAIN #> #Get Working Dir -$Script:WorkingDir = $WorkingDir +$Script:WorkingDir = $PSScriptRoot #Load functions . $WorkingDir\functions\Get-NotifLocale.ps1 From 3b581a32e1e53701d52dec117e6ae7cf49d7b235 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 11 Oct 2022 18:25:02 +0200 Subject: [PATCH 6/8] Strings in all Locale --- Winget-AutoUpdate/functions/Get-NotifLocale.ps1 | 7 ------- Winget-AutoUpdate/locale/de.xml | 12 ++++++++++++ Winget-AutoUpdate/locale/es.xml | 12 ++++++++++++ Winget-AutoUpdate/locale/fi.xml | 12 ++++++++++++ Winget-AutoUpdate/locale/fr.xml | 12 ++++++++++++ Winget-AutoUpdate/locale/hu.xml | 12 ++++++++++++ Winget-AutoUpdate/locale/it.xml | 12 ++++++++++++ Winget-AutoUpdate/locale/nl.xml | 12 ++++++++++++ Winget-AutoUpdate/locale/pl.xml | 12 ++++++++++++ 9 files changed, 96 insertions(+), 7 deletions(-) diff --git a/Winget-AutoUpdate/functions/Get-NotifLocale.ps1 b/Winget-AutoUpdate/functions/Get-NotifLocale.ps1 index 386409d..24b75e0 100644 --- a/Winget-AutoUpdate/functions/Get-NotifLocale.ps1 +++ b/Winget-AutoUpdate/functions/Get-NotifLocale.ps1 @@ -22,13 +22,6 @@ Function Get-NotifLocale { #Get locale XML file content [xml]$Script:NotifLocale = Get-Content $LocaleFile -Encoding UTF8 -ErrorAction SilentlyContinue - #Test if new strings exist in $LocaleFile - if ($null -eq $NotifLocale.local.outputs.output[7].message){ - $LocaleFile = "$WorkingDir\locale\en.xml" - #Get locale XML file content - [xml]$Script:NotifLocale = Get-Content $LocaleFile -Encoding UTF8 -ErrorAction SilentlyContinue - } - #Rerturn langague display name Return $LocaleDisplayName diff --git a/Winget-AutoUpdate/locale/de.xml b/Winget-AutoUpdate/locale/de.xml index b373116..81375d0 100644 --- a/Winget-AutoUpdate/locale/de.xml +++ b/Winget-AutoUpdate/locale/de.xml @@ -30,5 +30,17 @@ Bitte wenden sie sich an den Support. + + + Logs are not available yet! + + + + Starting a manual check for updated apps... + + + + Couldn't start a manual check for updated apps! + diff --git a/Winget-AutoUpdate/locale/es.xml b/Winget-AutoUpdate/locale/es.xml index aef9e3f..3a083c1 100644 --- a/Winget-AutoUpdate/locale/es.xml +++ b/Winget-AutoUpdate/locale/es.xml @@ -30,5 +30,17 @@ Por favor, póngase en contacto con el servicio de soporte. + + + Logs are not available yet! + + + + Starting a manual check for updated apps... + + + + Couldn't start a manual check for updated apps! + diff --git a/Winget-AutoUpdate/locale/fi.xml b/Winget-AutoUpdate/locale/fi.xml index 570b5c4..9a576a2 100644 --- a/Winget-AutoUpdate/locale/fi.xml +++ b/Winget-AutoUpdate/locale/fi.xml @@ -30,5 +30,17 @@ Ole yhteydessä tukeen. + + + Logs are not available yet! + + + + Starting a manual check for updated apps... + + + + Couldn't start a manual check for updated apps! + diff --git a/Winget-AutoUpdate/locale/fr.xml b/Winget-AutoUpdate/locale/fr.xml index 3362d5a..ad76473 100644 --- a/Winget-AutoUpdate/locale/fr.xml +++ b/Winget-AutoUpdate/locale/fr.xml @@ -30,5 +30,17 @@ Contacter le support. + + + Logs are not available yet! + + + + Starting a manual check for updated apps... + + + + Couldn't start a manual check for updated apps! + diff --git a/Winget-AutoUpdate/locale/hu.xml b/Winget-AutoUpdate/locale/hu.xml index 9cc70f1..8ac1671 100644 --- a/Winget-AutoUpdate/locale/hu.xml +++ b/Winget-AutoUpdate/locale/hu.xml @@ -30,5 +30,17 @@ Kérjük, forduljon az ügyfélszolgálathoz. + + + Logs are not available yet! + + + + Starting a manual check for updated apps... + + + + Couldn't start a manual check for updated apps! + diff --git a/Winget-AutoUpdate/locale/it.xml b/Winget-AutoUpdate/locale/it.xml index df3b99a..6e67787 100644 --- a/Winget-AutoUpdate/locale/it.xml +++ b/Winget-AutoUpdate/locale/it.xml @@ -30,5 +30,17 @@ Per favore contatta il supporto. + + + Logs are not available yet! + + + + Starting a manual check for updated apps... + + + + Couldn't start a manual check for updated apps! + diff --git a/Winget-AutoUpdate/locale/nl.xml b/Winget-AutoUpdate/locale/nl.xml index 16451dc..53bd252 100644 --- a/Winget-AutoUpdate/locale/nl.xml +++ b/Winget-AutoUpdate/locale/nl.xml @@ -30,5 +30,17 @@ Neem contact op met support. + + + Logs are not available yet! + + + + Starting a manual check for updated apps... + + + + Couldn't start a manual check for updated apps! + diff --git a/Winget-AutoUpdate/locale/pl.xml b/Winget-AutoUpdate/locale/pl.xml index a59e7a9..1b86530 100644 --- a/Winget-AutoUpdate/locale/pl.xml +++ b/Winget-AutoUpdate/locale/pl.xml @@ -30,5 +30,17 @@ Skontaktuj się z pomocą techniczną. + + + Logs are not available yet! + + + + Starting a manual check for updated apps... + + + + Couldn't start a manual check for updated apps! + From 067a5aab1ecb113a65c41dcac86aa3206a1f23ed Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 11 Oct 2022 23:54:17 +0200 Subject: [PATCH 7/8] List error check --- Winget-AutoUpdate/winget-upgrade.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/winget-upgrade.ps1 b/Winget-AutoUpdate/winget-upgrade.ps1 index 79be699..6c9ff00 100644 --- a/Winget-AutoUpdate/winget-upgrade.ps1 +++ b/Winget-AutoUpdate/winget-upgrade.ps1 @@ -83,7 +83,13 @@ if (Test-Network) { Write-Log "Newer List copied/downloaded to local path: $($WAUConfig.InstallLocation)" "Yellow" } else { - Write-Log "List is up to date." "Green" + if ((Test-Path "$WorkingDir\included_apps.txt") -or (Test-Path "$WorkingDir\excluded_apps.txt")) { + Write-Log "List is up to date." "Green" + } + else { + Write-Log "List doesn't exist!." "Red" + Exit 0 + } } } From c32e92b8380617e52554e51b492b2c3540014361 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 11 Oct 2022 23:57:31 +0200 Subject: [PATCH 8/8] Punctuation error --- Winget-AutoUpdate/winget-upgrade.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/winget-upgrade.ps1 b/Winget-AutoUpdate/winget-upgrade.ps1 index 6c9ff00..beb8f6c 100644 --- a/Winget-AutoUpdate/winget-upgrade.ps1 +++ b/Winget-AutoUpdate/winget-upgrade.ps1 @@ -87,7 +87,7 @@ if (Test-Network) { Write-Log "List is up to date." "Green" } else { - Write-Log "List doesn't exist!." "Red" + Write-Log "List doesn't exist!" "Red" Exit 0 } }