fleet/ee/maintained-apps/outputs/adobe-acrobat-pro/windows.json
Allen Houchins 95ac6ece71 Improve Acrobat uninstall detection and script ref
Make Acrobat uninstaller detection more robust and update metadata to the new script ref. app_commander.go: clarify the error log when an app remains after uninstall. adobe_acrobat_pro_uninstall.ps1: support both "Adobe Acrobat (64-bit)" and "Adobe Acrobat DC (64-bit)", guard against missing DisplayName, and ensure publisher filtering is applied before matching. windows.json: bump uninstall_script_ref to c94fe3ab and replace the embedded ref with the updated uninstall script.
2026-04-20 22:09:14 -05:00

22 lines
5.1 KiB
JSON

{
"versions": [
{
"version": "26.001.21431",
"queries": {
"exists": "SELECT 1 FROM programs WHERE name = 'Adobe Acrobat DC (64-bit)' AND publisher = 'Adobe';",
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE name = 'Adobe Acrobat DC (64-bit)' AND publisher = 'Adobe' AND version_compare(version, '26.001.21431') < 0);"
},
"installer_url": "https://trials.adobe.com/AdobeProducts/APRO/Acrobat_HelpX/win32/Acrobat_DC_Web_x64_WWMUI.zip",
"install_script_ref": "f7f87d02",
"uninstall_script_ref": "c94fe3ab",
"sha256": "e93e1bef99d88d722f6e78e56d9de17e8ea1b1fc75d05f1055839794010c0ee5",
"default_categories": [
"Productivity"
]
}
],
"refs": {
"c94fe3ab": "# Locate Adobe Acrobat Pro uninstaller from registry and execute it silently.\n# DisplayName is \"Adobe Acrobat DC (64-bit)\" on DC installs and may be \"Adobe Acrobat (64-bit)\" on others.\n\n$displayNames = @(\"Adobe Acrobat (64-bit)\", \"Adobe Acrobat DC (64-bit)\")\n$publisher = \"Adobe\"\n\n$paths = @(\n 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',\n 'HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall',\n 'HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall'\n)\n\n$uninstall = $null\nforeach ($p in $paths) {\n $items = Get-ItemProperty \"$p\\*\" -ErrorAction SilentlyContinue | Where-Object {\n $dn = $_.DisplayName\n if (-not $dn) { return $false }\n if ($publisher -ne \"\" -and $_.Publisher -ne $publisher) { return $false }\n foreach ($d in $displayNames) {\n if ($dn -eq $d -or $dn -like \"$d*\") { return $true }\n }\n $false\n }\n if ($items) { $uninstall = $items | Select-Object -First 1; break }\n}\n\nif (-not $uninstall -or -not $uninstall.UninstallString) {\n Write-Host \"Uninstall entry not found\"\n Exit 0\n}\n\n$acrobatProcesses = @(\"Acrobat\", \"AcroRd32\", \"RdrCEF\", \"AdobeCollabSync\")\nforeach ($proc in $acrobatProcesses) {\n Stop-Process -Name $proc -Force -ErrorAction SilentlyContinue\n}\n\n$uninstallCommand = $uninstall.UninstallString\n\nif ($uninstallCommand -match \"MsiExec\\.exe\\s+/[IX]\\s*(\\{[A-F0-9-]+\\})\") {\n $productCode = $Matches[1]\n $uninstallArgs = \"/X $productCode /qn /norestart\"\n $uninstallCommand = \"MsiExec.exe\"\n} else {\n Write-Host \"Error: Unable to parse uninstall command: $uninstallCommand\"\n Exit 1\n}\n\nWrite-Host \"Uninstall command: $uninstallCommand\"\nWrite-Host \"Uninstall args: $uninstallArgs\"\n\ntry {\n $processOptions = @{\n FilePath = $uninstallCommand\n ArgumentList = $uninstallArgs\n NoNewWindow = $true\n PassThru = $true\n Wait = $true\n }\n\n $process = Start-Process @processOptions\n $exitCode = $process.ExitCode\n\n Write-Host \"Uninstall exit code: $exitCode\"\n\n $timeout = 60\n $elapsed = 0\n while ((Get-Process -Name \"msiexec\" -ErrorAction SilentlyContinue) -and ($elapsed -lt $timeout)) {\n Start-Sleep -Seconds 2\n $elapsed += 2\n Write-Host \"Waiting for MsiExec to complete... ($elapsed seconds)\"\n }\n\n Exit $exitCode\n} catch {\n Write-Host \"Error running uninstaller: $_\"\n Exit 1\n}\n",
"f7f87d02": "# Adobe Acrobat Pro: the download is a zip that contains both AcroPro.msi and setup.exe\n# (under \"Adobe Acrobat\\\"). Prefer the MSI for a standard silent install; fall back to setup.exe.\n\n$zipFilePath = \"${env:INSTALLER_PATH}\"\n\ntry {\n $extractPath = Join-Path $env:TEMP \"AdobeAcrobatProInstall\"\n\n if (Test-Path $extractPath) {\n Remove-Item -Path $extractPath -Recurse -Force\n }\n\n Expand-Archive -Path $zipFilePath -DestinationPath $extractPath -Force\n\n $msiPath = Join-Path $extractPath \"Adobe Acrobat\\AcroPro.msi\"\n if (-not (Test-Path $msiPath)) {\n $found = Get-ChildItem -Path $extractPath -Filter \"AcroPro.msi\" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1\n if ($found) { $msiPath = $found.FullName }\n }\n\n if (Test-Path $msiPath) {\n $msiArgs = @(\n \"/i\", \"`\"$msiPath`\"\",\n \"/qn\", \"/norestart\",\n \"EULA_ACCEPT=YES\"\n )\n $process = Start-Process -FilePath \"msiexec.exe\" -ArgumentList $msiArgs -PassThru -Wait -NoNewWindow\n $exitCode = $process.ExitCode\n Write-Host \"Install exit code (msiexec): $exitCode\"\n } else {\n $setupExe = Join-Path $extractPath \"Adobe Acrobat\\setup.exe\"\n if (-not (Test-Path $setupExe)) {\n Write-Host \"Error: Neither AcroPro.msi nor Adobe Acrobat\\setup.exe found under $extractPath\"\n Exit 1\n }\n $process = Start-Process -FilePath $setupExe -ArgumentList \"/sAll /rs /msi EULA_ACCEPT=YES\" -PassThru -Wait\n $exitCode = $process.ExitCode\n Write-Host \"Install exit code (setup.exe): $exitCode\"\n }\n\n Remove-Item -Path $extractPath -Recurse -Force -ErrorAction SilentlyContinue\n\n Exit $exitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n"
}
}