Hello. I may have recently stumbled upon a bug in the Remove-MSIApplications function. I’m trying to uninstall previous versions of QGIS before installing the new version. Some versions have an .exe uninstaller, newer versions use an MSI. Here is the code I’m using to detect installed versions:
$installed = Get-InstalledApplication -Wildcard -Name "QGIS*"
foreach($qgis in $installed)
{
if ($qgis.UninstallString -like "msiexec*")
{
Remove-MSIApplications -Name "$($qgis.DisplayName)"
Remove-Folder -Path "$envProgramFiles\$appName $($qgis.DisplayVersion)"
}
When this executes, the previous version is detected, but the toolkit does not remove it (see log file below)
I’m not sure if it’s because there are single quotes in the application name, or if this is a bug in the code. I wanted to get others’ thought before filing a bug on the GitHub project. Any thoughts would be greatly appreciated!