From 30a34577bcfb40767d23513491312c8938b4173a Mon Sep 17 00:00:00 2001 From: Romanitho <96626929+Romanitho@users.noreply.github.com> Date: Sun, 16 Jan 2022 18:05:33 +0100 Subject: [PATCH] Add files via upload --- winget-update/Invisible.vbs | 1 + winget-update/error.png | Bin 0 -> 3733 bytes winget-update/info.png | Bin 0 -> 3324 bytes winget-update/success.png | Bin 0 -> 4198 bytes winget-update/warning.png | Bin 0 -> 3221 bytes winget-update/winget-notify.ps1 | 21 +++ winget-update/winget-upgrade.ps1 | 278 +++++++++++++++++++++++++++++++ 7 files changed, 300 insertions(+) create mode 100644 winget-update/Invisible.vbs create mode 100644 winget-update/error.png create mode 100644 winget-update/info.png create mode 100644 winget-update/success.png create mode 100644 winget-update/warning.png create mode 100644 winget-update/winget-notify.ps1 create mode 100644 winget-update/winget-upgrade.ps1 diff --git a/winget-update/Invisible.vbs b/winget-update/Invisible.vbs new file mode 100644 index 0000000..78fd137 --- /dev/null +++ b/winget-update/Invisible.vbs @@ -0,0 +1 @@ +CreateObject("Wscript.Shell").Run "" & WScript.Arguments(0) & "", 0, False \ No newline at end of file diff --git a/winget-update/error.png b/winget-update/error.png new file mode 100644 index 0000000000000000000000000000000000000000..b58f0804115d0d4859b9f6be37e829c7cdd78d0d GIT binary patch literal 3733 zcmV;G4r=jDgGeaNKV3WddO*W zPMRFIag5zm4mEbtIPGyxdRnJ1IW|ZTrA`Az3wF&*9U42}v?&on!L~3Y7;Gq3K|*gk zPd`Yj3Tao;O0#okcjxy>duQ&w|K<5}XLjb^=L#8yf*h-MSXcf+8Lm2U3p%2cYe7Fl|Th>y=6(Q zq8d>#yTa$4eMON-w`Dy^kroDMuCC5Cxg9G+xliE_fGcckNjv4AIXivJRMSTThal0k%0BeXguwce8CViSVTXTGv)Ab;LXZRN+&N zNpb+yZxlB~Uh>;bq;LLl6{Mwh)f%JD*AzZsTTg1xp9}K!h4oF_{bB@P7@)PbveHr6 z2rRa(#Ul=ZJYG`2bGL0FRt<3U!HR{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`iW?$(6rP>9t^jY4r{g{GOGHvhqH@mbBPhQ}UQ~cb zyxviGx-OXtNg1Fh66tn`)&d!wRwhk38y2k|@6aD3=`?X=4ZE9F%%=(N2mFMJk{GU+Yr*b_dlD+gwDPl!q9O+EV1>S@~5w-;DE*|q|b;*itZ zxvZ>lU*hD)`&Cse2xKkx)FSE$p8Q)TX!8NJmvR**WGF}U<8M9LVZh1>zm$nt3lUur#DxZ7n+=@ zKMZaRU1v{N^xmQ^k+FBZNCMaQ3n**cchTuBTn)O_?Y6U+7xQvEtK1Ggq`&|GWsQwJ z#n<0bE6O(so)}IBMR}_D`kSj4e1Bh8DmqB{_8CWNs+J478JL~wzA}uniu2jh`dulV zlIO|(DaUFnKiaFNLC~dM^q1}^{7f9@{*tY`j;FdWPxcHd+7kKonNuChfF}UQi$2p7 z1)l9JJhRk`;Dbjaz))J&R^EY_?}C=^k%GLt#n!1GKOTPZ1S<2F??y{%MyCzA`|J)(2Pp zjylf63N?T~@~cc71ztt<*^-9H4%=de<4Xg?IQ+nhxgnENBj_Ik^K9!$lJ^9CJ{0A9 zMcX28+ZK}uUmGCC-tzMBRafONSK)qvH40bS)|7zrz`ufQJAJC-)n)tk_1P9Q7HMIC zp)^-l=SsNa4iPGV3ZT@kB56k1rNS=l&HwkINf^_Cv@^hPnyXjNF=3V(A{=|ngOoC7_hA}5V%8!By%(BkGq48QPy%+S}7JgZ|k00000NkvXXu0mjfp|T+u literal 0 HcmV?d00001 diff --git a/winget-update/info.png b/winget-update/info.png new file mode 100644 index 0000000000000000000000000000000000000000..7760bdea34aa6e8273287a6770517b2942de33e5 GIT binary patch literal 3324 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vG($^ZZ*$^pm#hJpY943SAhK~#8N?VSs7 zRMi>B&v!N(ln{0|fq-xDIlkH%LD4~5L?c@D&mZfLLR6ssMH5OtLRWv1Z|Z-lHHI5lHGg0e&^nkkTttuH+y%p_ulhk&YbW2 zHeq)6{BzEC&OP@YU@oL$W$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afsu*}pH*~!KHGHwIN*)wor~ALnAdaGd7m#}*_uP=t11@VBj~gFZo7niFFtgk zrTX^HybtD8kO?DX&90Gf&4yoA;m>hb5Objde;TP--?nngp-YA6px~!+SjOsn+J{}-hEXyT_+3OkuP%wRj=)Q zClVjtg7Prn`O)VbrNEOB@6={L4nA18niq>U-2vvWLD%@*cab};Di36GGepcS!f(o&UB2IxVD)98}s<`@=+D<;X;44 z%S2HXz_?g++gk9x2HXz>Z0E_50zXjICzsT9?y()_YDHN9;|7jyy*>~uyI;}Y1a7dM zCqq9|^gG7msYre2Teic@q^JvEoE~fl4u&f4GH@S4D-f}rX$CQb7mO!6LuZG7AX^S4 zZ3jwcP87hEw6CpvXk_>fRT_atV71*u(g$=2bcHJ_|HH;txm?V-0=U}gqs`Zq2ic^; zCY1HS%|N(7-3=jf9P}8Tyi!&kIGnE=Gi;gj1u&ghZ{rG8xd|~V@pJ{k4WcYVs0ONm zN|fNlNhswULK3(D44@2%=qXR-r-=5eO1}|)l+PP6ipBo}yRxdnap8x400000NkvXX Hu0mjfBC}4n literal 0 HcmV?d00001 diff --git a/winget-update/winget-notify.ps1 b/winget-update/winget-notify.ps1 new file mode 100644 index 0000000..d8053d2 --- /dev/null +++ b/winget-update/winget-notify.ps1 @@ -0,0 +1,21 @@ +#Send Notif Script + +#get xml notif config +[xml]$NotifConf = Get-Content "C:\ProgramData\winget-update\notif.xml" -Encoding UTF8 +if (!($NotifConf)) {break} + +#Load Assemblies +[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null +[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null + +#Prepare XML +$ToastXml = [Windows.Data.Xml.Dom.XmlDocument]::New() +$ToastXml.LoadXml($NotifConf.OuterXml) + +#Specify Launcher App ID +$LauncherID = "Windows.SystemToast.Winget.Notification" + +#Prepare and Create Toast +$ToastMessage = [Windows.UI.Notifications.ToastNotification]::New($ToastXML) +$ToastMessage.Tag = $NotifConf.toast.tag +[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier($LauncherID).Show($ToastMessage) \ No newline at end of file diff --git a/winget-update/winget-upgrade.ps1 b/winget-update/winget-upgrade.ps1 new file mode 100644 index 0000000..f1b7d4d --- /dev/null +++ b/winget-update/winget-upgrade.ps1 @@ -0,0 +1,278 @@ +function Init { + #Var + $Script:WorkingDir = "C:\ProgramData\winget-update" + + #Logs initialisation + $LogPath = "$WorkingDir\logs" + if (!(Test-Path $LogPath)){ + New-Item -ItemType Directory -Force -Path $LogPath + } + + #Log file + $Script:LogFile = "$LogPath\updates.log" + + #Log Header + $Log = "##################################################`n# CHECK FOR APP UPDATES - $(Get-Date -Format 'dd/MM/yyyy')`n##################################################" + $Log | Write-host + $Log | out-file -filepath $LogFile -Append +} + +function Write-Log ($LogMsg,$LogColor = "White") { + #Get log + $Log = "$(Get-Date -UFormat "%T") - $LogMsg" + #Echo log + $Log | Write-host -ForegroundColor $LogColor + #Write log to file + $Log | out-file -filepath $LogFile -Append +} + +function Run-NotifTask ($Title,$Message,$MessageType,$Balise) { + + #Add XML variables +[xml]$ToastTemplate = @" + + + + $Title + $Message + + + + $Balise + +"@ + + #Save XML File + $ToastTemplate.Save("$WorkingDir\notif.xml") + + #Send Notification to user + Get-ScheduledTask -TaskName "Winget Update Notify" -ErrorAction SilentlyContinue | Start-ScheduledTask -ErrorAction SilentlyContinue + #Wait for notification to display + while ((Get-ScheduledTask -TaskName "Winget Update Notify").State -ne 'Ready') { + echo "Waiting on scheduled task..." + } +} + +function Test-Network { + $timeout = 0 + $ping = $false + #test connectivity during 30 min then timeout + Write-Log "Checking internet connection..." "Yellow" + while (!$ping -and $timeout -lt 1800){ + try{ + Invoke-RestMethod -Uri 'https://en.wikipedia.org/api/rest_v1/' + Write-Log "Coonected !" "Green" + $ping = $true + return + } + catch{ + sleep 10 + $timeout += 10 + Write-Log "Checking internet connection. $($timeout)s." "Yellow" + } + if ($timeout -eq 300){ + #Send Notif if no connection for 5 min + Write-Log "Notify 'No connection'" "Yellow" + $Title = "Vérifiez votre connexion réseau" + $Message = "Impossible de vérifier les mises à jours logicielles pour le moment !" + $MessageType = "warning" + $Balise = "connection" + Run-NotifTask $Title $Message $MessageType $Balise + } + } + return $ping +} + +function Get-WingetOutdated { + class Software { + [string]$Name + [string]$Id + [string]$Version + [string]$AvailableVersion + } + + #Get WinGet Location to run as system + if (Test-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\AppInstallerCLI.exe"){ + #WinGet < 1.17 + $script:upgradecmd = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\AppInstallerCLI.exe" | Select -ExpandProperty Path + + } + elseif (Test-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe"){ + #WinGet > 1.17 + $script:upgradecmd = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe" | Select -ExpandProperty Path + } + else{ + Write-Log "No Winget installed !" + return + } + + $upgradeResult = & $upgradecmd upgrade | Out-String + + if (!($upgradeResult -match "-----")){ + return + } + + $lines = $upgradeResult.Split([Environment]::NewLine) + + # Find the line that starts with ------ + $fl = 0 + while (-not $lines[$fl].StartsWith("-----")) + { + $fl++ + } + + #Get header line + $fl = $fl - 2 + + #Get header titles + $index = $lines[$fl] -split '\s+' + + # Line $i has the header, we can find char where we find ID and Version + $idStart = $lines[$fl].IndexOf($index[1]) + $versionStart = $lines[$fl].IndexOf($index[2]) + $availableStart = $lines[$fl].IndexOf($index[3]) + $sourceStart = $lines[$fl].IndexOf($index[4]) + + # Now cycle in real package and split accordingly + $upgradeList = @() + For ($i = $fl + 2; $i -le $lines.Length; $i++) + { + $line = $lines[$i] + if ($line.Length -gt ($availableStart + 1) -and -not $line.StartsWith('-')) + { + $name = $line.Substring(0, $idStart).TrimEnd() + $id = $line.Substring($idStart, $versionStart - $idStart).TrimEnd() + $version = $line.Substring($versionStart, $availableStart - $versionStart).TrimEnd() + $available = $line.Substring($availableStart, $sourceStart - $availableStart).TrimEnd() + $software = [Software]::new() + $software.Name = $name; + $software.Id = $id; + $software.Version = $version + $software.AvailableVersion = $available; + $upgradeList += $software + } + } + + return $upgradeList +} + +### MAIN ### + +#Run initialisation +Init + +#Exclude apps (auto update) +$toSkip = @( +"Google.Chrome", +"Mozilla.Firefox", +"Microsoft.Edge", +"Microsoft.Office" +) + +#Check network connectivity +$ping = Test-Network + +if ($ping){ + + #Get outdated choco packages + Write-Log "Checking available updates..." "yellow" + + #Get outdated apps + $outdated = Get-WingetOutdated + + #Log list of app to update + foreach ($app in $outdated){ + #List available updates + $Log = "Available update : $($app.Name). Current version : $($app.Version). Available version : $($app.AvailableVersion)." + $Log | Write-host + $Log | out-file -filepath $LogFile -Append + } + + #Count good update installs + $InstallOK = 0 + + #For each app, notify and update + foreach ($app in $outdated){ + + if (-not ($toSkip -contains $app.Id)){ + + #Send available update notification + Write-Log "Updating $($app.Name) from $($app.Version) to $($app.AvailableVersion)..." "Cyan" + + #Send Notif + $Title = "$($app.Name) va être mis à jour." + $Message = "$($app.Version) -> $($app.AvailableVersion)" + $MessageType = "info" + $Balise = $($app.Name) + Run-NotifTask $Title $Message $MessageType $Balise + + #Install update + $Log = "#--- Winget - $($app.Name) Upgrade Starts ---" + $Log | Write-host -ForegroundColor Gray + $Log | out-file -filepath $LogFile -Append + + #Winget upgrade + & $upgradecmd upgrade -e --id $($app.Id) --accept-package-agreements --accept-source-agreements + Sleep 3 + + $Log = "#--- Winget - $($app.Name) Upgrade Finished ---" + $Log | Write-host -ForegroundColor Gray + $Log | out-file -filepath $LogFile -Append + + #Check installed version + $checkoutdated = Get-WingetOutdated + $FailedToUpgrade = $false + foreach ($checkapp in $checkoutdated){ + if ($($checkapp.Id) -eq $($app.Id)) { + $FailedToUpgrade = $true + } + } + + #Notify installation + if ($FailedToUpgrade -eq $false){ + #Send success updated app notification + Write-Log "$($app.Name) updated to $($app.AvailableVersion) !" "Green" + + #Send Notif + $Title = "$($app.Name) a été mis à jour." + $Message = "Version installée : $($app.AvailableVersion)" + $MessageType = "success" + $Balise = $($app.Name) + Run-NotifTask $Title $Message $MessageType $Balise + + $InstallOK += 1 + } + else { + #Send failed updated app notification + Write-Log "$($app.Name) update failed." "Red" + + #Send Notif + $Title = "$($app.Name) n'a pas pu être mis à jour !" + $Message = "Contacter le support." + $MessageType = "error" + $Balise = $($app.Name) + Run-NotifTask $Title $Message $MessageType $Balise + } + } + else{ + Write-Log "Skipped upgrade because $($app.Name) is in the excluded app list" "Gray" + } + } + + if ($InstallOK -gt 0){ + Write-Log "$InstallOK apps updated ! No more update." "Green" + } + if ($InstallOK -eq 0){ + Write-Log "No new update." "Green" + } +} +else{ + Write-Log "Timeout. No internet connection !" "Red" + #Send Notif + $Title = "Aucune connexion réseau" + $Message = "Les mises à jour logicielles n'ont pas pu être vérifiées !" + $MessageType = "error" + $Balise = "connection" + Run-NotifTask $Title $Message $MessageType $Balise +} +Write-Log "End of process!" "Cyan" \ No newline at end of file