From 4095e126db33560b29968653105028df58a882e1 Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Tue, 1 Oct 2024 00:13:38 +0200 Subject: [PATCH] remove mods on uninstall --- Sources/Winget-AutoUpdate/config/WAU-MSI_Actions.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/Winget-AutoUpdate/config/WAU-MSI_Actions.ps1 b/Sources/Winget-AutoUpdate/config/WAU-MSI_Actions.ps1 index 309ec1d..57821c7 100644 --- a/Sources/Winget-AutoUpdate/config/WAU-MSI_Actions.ps1 +++ b/Sources/Winget-AutoUpdate/config/WAU-MSI_Actions.ps1 @@ -192,7 +192,7 @@ function Uninstall-WingetAutoUpdate { Get-ScheduledTask -TaskName "Winget-AutoUpdate-UserContext" -ErrorAction SilentlyContinue | Unregister-ScheduledTask -Confirm:$False Get-ScheduledTask -TaskName "Winget-AutoUpdate-Policies" -ErrorAction SilentlyContinue | Unregister-ScheduledTask -Confirm:$False - #If upgrade, keep app list. Else, remove. + #If upgrade, keep app list and mods. Else, remove. if ($Upgrade -like "#{*}") { Write-Output "-> Upgrade detected. Keeping *.txt app lists" } @@ -202,6 +202,7 @@ function Uninstall-WingetAutoUpdate { Write-Output "-> Removing items: $AppLists" Remove-Item $AppLists -Force } + Remove-Item "$InstallPath\mods" -Recurse -Force } $ConfFolder = Get-Item (Join-Path "$InstallPath" "config") -ErrorAction SilentlyContinue