remove mods on uninstall

pull/725/head
Romain 2024-10-01 00:13:38 +02:00
parent 0cf8ca2047
commit 4095e126db
1 changed files with 2 additions and 1 deletions

View File

@ -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