<# #Mods for WAU (postsys) - if Network is active/any Winget is installed/running as SYSTEM after SYSTEM updates Winget-Upgrade.ps1 calls this script with the code: [Write-ToLog "Running Mods (postsys) for WAU..." "Yellow" & "$Mods\_WAU-mods-postsys.ps1"] Make sure your Functions have unique names! #> <# FUNCTIONS #> . $PSScriptRoot\_Mods-Functions.ps1 <# ARRAYS/VARIABLES #> #Beginning of Desktop Link Name to Remove - optional wildcard (*) after, without .lnk, multiple: "lnk1","lnk2" $Lnk = @("4K Video Downloader","Acrobat Read*","Arduino IDE","Audacity","Beyond Compare*","Bitwarden","calibre*","Cisco Webex Meetings","EV3 Classroom","Firefox","FreeCAD*","GanttProject","GIMP *","Google Earth Pro", "Inkscape", "KeePass*","Kleopatra","LightBurn","Mp3tag","NTLite","NVIDIA","OBS Studio","Oracle VM VirtualBox","PeaZip","Plantronics Hub","VLC media player","WinSCP") #Beginning of App Name string to Silently Uninstall (MSI/NSIS/INNO/EXE with defined silent uninstall in registry) #Multiple: "app1*","app2*", required wildcard (*) after; search is done with "-like"! #Uninstall all versions if there exist several? # Check if GIMP 2 uninstaller exists before defining $AppUninst if ((Test-Path "$env:ProgramFiles\GIMP 2\uninst\unins000.exe") -and (Test-Path "$env:ProgramFiles\GIMP 3\uninst\unins000.exe")) { $AppUninst = @("GIMP 2*") $AllVersions = $False } else { $AppUninst = $null } <# MAIN #> if ($AppUninst) { Uninstall-ModsApp $AppUninst $AllVersions Write-ToLog "-> GIMP 2 uninstalled!" "Green" } if ($Lnk) { $removedCount = Remove-ModsLnk $Lnk Write-ToLog "-> Removed $($removedCount) Public Desktop Links!" "Green" } Write-ToLog "-> ...Mods (postsys) for WAU has nothing more to do!" "Green"