Automated ingestion of latest Fleet-maintained app data. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated installer metadata for 13 apps (new versions, updated download links and checksums) across Windows and macOS. * Added a Windows uninstall script for TextExpander and registered it in the package manifest to improve uninstall behavior and exit-code handling. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: allenhouchins <32207388+allenhouchins@users.noreply.github.com> Co-authored-by: Allen Houchins <allenhouchins@mac.com>
30 lines
1.2 KiB
PowerShell
30 lines
1.2 KiB
PowerShell
# Fleet uninstalls app by finding all related product codes for the specified upgrade code
|
|
$inst = New-Object -ComObject "WindowsInstaller.Installer"
|
|
$timeoutSeconds = 300 # 5 minute timeout per product
|
|
|
|
# MSI exit codes that indicate success. 3010 = ERROR_SUCCESS_REBOOT_REQUIRED,
|
|
# 1641 = ERROR_SUCCESS_REBOOT_INITIATED. The TextExpander MSI returns 3010 on a
|
|
# successful uninstall, so treat these as success rather than failure.
|
|
$successCodes = @(0, 3010, 1641)
|
|
|
|
foreach ($product_code in $inst.RelatedProducts('{F6F4E16E-F3FD-4CD1-A4E5-587808F9C886}')) {
|
|
$process = Start-Process msiexec -ArgumentList @("/quiet", "/x", $product_code, "/norestart") -PassThru
|
|
|
|
# Wait for process with timeout
|
|
$completed = $process.WaitForExit($timeoutSeconds * 1000)
|
|
|
|
if (-not $completed) {
|
|
Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue
|
|
Exit 1603 # ERROR_UNINSTALL_FAILURE
|
|
}
|
|
|
|
# If the uninstall failed, bail
|
|
if ($successCodes -notcontains $process.ExitCode) {
|
|
Write-Output "Uninstall for $($product_code) exited $($process.ExitCode)"
|
|
Exit $process.ExitCode
|
|
}
|
|
}
|
|
|
|
# All uninstalls succeeded; exit success
|
|
Exit 0
|