Add BlueJ as a maintained Windows app: new winget input manifest (ee/maintained-apps/inputs/winget/bluej.json), PowerShell install and uninstall scripts (ee/maintained-apps/inputs/winget/scripts/bluej_install.ps1 and bluej_uninstall.ps1), and output metadata (ee/maintained-apps/outputs/bluej/windows.json). Also update apps index (ee/maintained-apps/outputs/apps.json) to include BlueJ. The install script passes ALLUSERS=2 so the per-user WiX MSI installs per-machine when run elevated; the uninstall script finds related product codes for the app's upgrade code and uninstalls each with a timeout. The outputs include version 5.5.0, installer URL, checksum, and embedded script refs.
25 lines
900 B
PowerShell
25 lines
900 B
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
|
|
|
|
foreach ($product_code in $inst.RelatedProducts('{F4B4357E-6101-4CB1-8E38-3D4F3AFB4BE2}')) {
|
|
$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 ($process.ExitCode -ne 0) {
|
|
Write-Output "Uninstall for $($product_code) exited $($process.ExitCode)"
|
|
Exit $process.ExitCode
|
|
}
|
|
}
|
|
|
|
# All uninstalls succeeded; exit success
|
|
Exit 0
|