Repository navigation
Fix Adobe Acrobat Pro and Reader (Windows) FMA queries and uninstall scripts - #54321
Conversation
The exists/patched queries matched programs.name = 'Adobe Acrobat DC (64-bit)', the name Fleet's windows_acrobat_dc software override writes into inventory server-side. Policies run against the raw osquery programs table, where the DisplayName is 'Adobe Acrobat (64-bit)' (shared with Reader 64-bit), so the automatic-install policy never passed and the patch policy never failed. Match on Pro's MSI ProductCode instead, which is distinct from Reader's and constant across all language transforms. The open query looked for 'adobe acrobat pro.exe'; the app runs as Acrobat.exe.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
It must incorporate the now-merged catalog update, add regression coverage, and include a changes entry.
Review effort: Balanced
Findings: 2
Open (3)
What changed in this PR
Fixes Adobe Acrobat Pro detection and patch/open policies on Windows.
Changes:
- Detects Pro via MSI ProductCode.
- Detects
Acrobat.exeas the running process. - Updates generated FMA queries.
| File | Description |
|---|---|
pkg/patch_policy/patch_policy.go |
Adds Acrobat process override. |
ee/maintained-apps/inputs/winget/adobe-acrobat-pro.json |
Adds ProductCode-based existence query. |
ee/maintained-apps/outputs/adobe-acrobat-pro/windows.json |
Updates generated policies. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe Adobe Acrobat Pro and Reader Winget inputs add existence queries that match product GUIDs and publisher Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #54321 +/- ##
==========================================
- Coverage 77.37% 77.05% -0.32%
==========================================
Files 4327 4308 -19
Lines 269969 267959 -2010
Branches 15781 15188 -593
==========================================
- Hits 208897 206485 -2412
- Misses 60885 61296 +411
+ Partials 187 178 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ll scripts Reader 64-bit shares Acrobat Pro's DisplayName, publisher and UpgradeCode, so its name-based exists/patched queries also matched Pro hosts: an outdated Pro failed Reader's patch policy. Match on Reader's MSI ProductCode instead, and fix its open query (the unified app runs as Acrobat.exe). Both uninstall scripts picked the first ARP entry named "Adobe Acrobat (64-bit)", so uninstalling one product could remove the other. They now uninstall by their own product code via $PACKAGE_ID.
…ic-davinci-ffea88 # Conflicts: # ee/maintained-apps/outputs/adobe-acrobat-pro/windows.json
Script Diff Resultsee/maintained-apps/outputs/adobe-acrobat-pro/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/adobe-acrobat-reader/windows.json=== Install Script (no changes) ===
=== Uninstall // 3bb10c80 -> d3c91b2b ===
--- /tmp/old.8AvhEy 2026-09-29 15:10:21.206101864 +0000
+++ /tmp/new.KLJmIp 2026-09-29 15:10:21.206101864 +0000
@@ -1,45 +1,20 @@
-# Attempts to locate Adobe Acrobat Reader uninstaller from registry and execute it silently
+# Uninstalls Adobe Acrobat Reader (64-bit) by its MSI product code. Acrobat Pro 64-bit
+# registers the same DisplayName and publisher, so matching on name could remove Pro.
-$displayName = "Adobe Acrobat (64-bit)"
-$publisher = "Adobe"
+$productCode = '{AC76BA86-1033-FF00-7760-BC15014EA700}'
-$paths = @(
- 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'
-)
-
-$uninstall = $null
-foreach ($p in $paths) {
- $items = Get-ItemProperty "$p\*" -ErrorAction SilentlyContinue | Where-Object {
- $_.DisplayName -and ($_.DisplayName -eq $displayName -or $_.DisplayName -like "$displayName*") -and ($publisher -eq "" -or $_.Publisher -eq $publisher)
- }
- if ($items) { $uninstall = $items | Select-Object -First 1; break }
-}
-
-if (-not $uninstall -or -not $uninstall.UninstallString) {
+if (-not (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$productCode")) {
Write-Host "Uninstall entry not found"
Exit 0
}
-# Kill any running Acrobat Reader processes before uninstalling
$acrobatProcesses = @("AcroRd32", "Acrobat", "RdrCEF")
foreach ($proc in $acrobatProcesses) {
Stop-Process -Name $proc -Force -ErrorAction SilentlyContinue
}
-$uninstallCommand = $uninstall.UninstallString
-
-# Adobe typically uses MsiExec for uninstall
-# Parse the command to extract the product code
-if ($uninstallCommand -match "MsiExec\.exe\s+/[IX]\s*(\{[A-F0-9-]+\})") {
- $productCode = $Matches[1]
- $uninstallArgs = "/X $productCode /qn /norestart"
- $uninstallCommand = "MsiExec.exe"
-} else {
- Write-Host "Error: Unable to parse uninstall command: $uninstallCommand"
- Exit 1
-}
+$uninstallCommand = "MsiExec.exe"
+$uninstallArgs = "/X $productCode /qn /norestart"
Write-Host "Uninstall command: $uninstallCommand"
Write-Host "Uninstall args: $uninstallArgs" |
Script Diff Resultsee/maintained-apps/outputs/adobe-acrobat-pro/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/adobe-acrobat-reader/windows.json=== Install Script (no changes) ===
=== Uninstall // 3bb10c80 -> d3c91b2b ===
--- /tmp/old.Fx3G79 2026-09-29 15:19:36.431842719 +0000
+++ /tmp/new.4f06oz 2026-09-29 15:19:36.431842719 +0000
@@ -1,45 +1,20 @@
-# Attempts to locate Adobe Acrobat Reader uninstaller from registry and execute it silently
+# Uninstalls Adobe Acrobat Reader (64-bit) by its MSI product code. Acrobat Pro 64-bit
+# registers the same DisplayName and publisher, so matching on name could remove Pro.
-$displayName = "Adobe Acrobat (64-bit)"
-$publisher = "Adobe"
+$productCode = '{AC76BA86-1033-FF00-7760-BC15014EA700}'
-$paths = @(
- 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'
-)
-
-$uninstall = $null
-foreach ($p in $paths) {
- $items = Get-ItemProperty "$p\*" -ErrorAction SilentlyContinue | Where-Object {
- $_.DisplayName -and ($_.DisplayName -eq $displayName -or $_.DisplayName -like "$displayName*") -and ($publisher -eq "" -or $_.Publisher -eq $publisher)
- }
- if ($items) { $uninstall = $items | Select-Object -First 1; break }
-}
-
-if (-not $uninstall -or -not $uninstall.UninstallString) {
+if (-not (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$productCode")) {
Write-Host "Uninstall entry not found"
Exit 0
}
-# Kill any running Acrobat Reader processes before uninstalling
$acrobatProcesses = @("AcroRd32", "Acrobat", "RdrCEF")
foreach ($proc in $acrobatProcesses) {
Stop-Process -Name $proc -Force -ErrorAction SilentlyContinue
}
-$uninstallCommand = $uninstall.UninstallString
-
-# Adobe typically uses MsiExec for uninstall
-# Parse the command to extract the product code
-if ($uninstallCommand -match "MsiExec\.exe\s+/[IX]\s*(\{[A-F0-9-]+\})") {
- $productCode = $Matches[1]
- $uninstallArgs = "/X $productCode /qn /norestart"
- $uninstallCommand = "MsiExec.exe"
-} else {
- Write-Host "Error: Unable to parse uninstall command: $uninstallCommand"
- Exit 1
-}
+$uninstallCommand = "MsiExec.exe"
+$uninstallArgs = "/X $productCode /qn /norestart"
Write-Host "Uninstall command: $uninstallCommand"
Write-Host "Uninstall args: $uninstallArgs" |
Script Diff Resultsee/maintained-apps/outputs/adobe-acrobat-pro/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/adobe-acrobat-reader/windows.json=== Install Script (no changes) ===
=== Uninstall // 3bb10c80 -> d3c91b2b ===
--- /tmp/old.P6fiFD 2026-10-05 18:06:33.331563526 +0000
+++ /tmp/new.YpIU8e 2026-10-05 18:06:33.331563526 +0000
@@ -1,45 +1,20 @@
-# Attempts to locate Adobe Acrobat Reader uninstaller from registry and execute it silently
+# Uninstalls Adobe Acrobat Reader (64-bit) by its MSI product code. Acrobat Pro 64-bit
+# registers the same DisplayName and publisher, so matching on name could remove Pro.
-$displayName = "Adobe Acrobat (64-bit)"
-$publisher = "Adobe"
+$productCode = '{AC76BA86-1033-FF00-7760-BC15014EA700}'
-$paths = @(
- 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'
-)
-
-$uninstall = $null
-foreach ($p in $paths) {
- $items = Get-ItemProperty "$p\*" -ErrorAction SilentlyContinue | Where-Object {
- $_.DisplayName -and ($_.DisplayName -eq $displayName -or $_.DisplayName -like "$displayName*") -and ($publisher -eq "" -or $_.Publisher -eq $publisher)
- }
- if ($items) { $uninstall = $items | Select-Object -First 1; break }
-}
-
-if (-not $uninstall -or -not $uninstall.UninstallString) {
+if (-not (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$productCode")) {
Write-Host "Uninstall entry not found"
Exit 0
}
-# Kill any running Acrobat Reader processes before uninstalling
$acrobatProcesses = @("AcroRd32", "Acrobat", "RdrCEF")
foreach ($proc in $acrobatProcesses) {
Stop-Process -Name $proc -Force -ErrorAction SilentlyContinue
}
-$uninstallCommand = $uninstall.UninstallString
-
-# Adobe typically uses MsiExec for uninstall
-# Parse the command to extract the product code
-if ($uninstallCommand -match "MsiExec\.exe\s+/[IX]\s*(\{[A-F0-9-]+\})") {
- $productCode = $Matches[1]
- $uninstallArgs = "/X $productCode /qn /norestart"
- $uninstallCommand = "MsiExec.exe"
-} else {
- Write-Host "Error: Unable to parse uninstall command: $uninstallCommand"
- Exit 1
-}
+$uninstallCommand = "MsiExec.exe"
+$uninstallArgs = "/X $productCode /qn /norestart"
Write-Host "Uninstall command: $uninstallCommand"
Write-Host "Uninstall args: $uninstallArgs" |
|
@allenhouchins Conflicts need to be resolved. |
# Conflicts: # ee/maintained-apps/outputs/adobe-acrobat-reader/windows.json
Script Diff Resultsee/maintained-apps/outputs/adobe-acrobat-pro/windows.json=== Install Script (no changes) ===
=== Uninstall Script (no changes) ===ee/maintained-apps/outputs/adobe-acrobat-reader/windows.json=== Install Script (no changes) ===
=== Uninstall // 3bb10c80 -> d3c91b2b ===
--- /tmp/old.FvmLTe 2026-10-16 12:15:02.425602693 +0000
+++ /tmp/new.z30S3F 2026-10-16 12:15:02.425602693 +0000
@@ -1,45 +1,20 @@
-# Attempts to locate Adobe Acrobat Reader uninstaller from registry and execute it silently
+# Uninstalls Adobe Acrobat Reader (64-bit) by its MSI product code. Acrobat Pro 64-bit
+# registers the same DisplayName and publisher, so matching on name could remove Pro.
-$displayName = "Adobe Acrobat (64-bit)"
-$publisher = "Adobe"
+$productCode = '{AC76BA86-1033-FF00-7760-BC15014EA700}'
-$paths = @(
- 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'
-)
-
-$uninstall = $null
-foreach ($p in $paths) {
- $items = Get-ItemProperty "$p\*" -ErrorAction SilentlyContinue | Where-Object {
- $_.DisplayName -and ($_.DisplayName -eq $displayName -or $_.DisplayName -like "$displayName*") -and ($publisher -eq "" -or $_.Publisher -eq $publisher)
- }
- if ($items) { $uninstall = $items | Select-Object -First 1; break }
-}
-
-if (-not $uninstall -or -not $uninstall.UninstallString) {
+if (-not (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$productCode")) {
Write-Host "Uninstall entry not found"
Exit 0
}
-# Kill any running Acrobat Reader processes before uninstalling
$acrobatProcesses = @("AcroRd32", "Acrobat", "RdrCEF")
foreach ($proc in $acrobatProcesses) {
Stop-Process -Name $proc -Force -ErrorAction SilentlyContinue
}
-$uninstallCommand = $uninstall.UninstallString
-
-# Adobe typically uses MsiExec for uninstall
-# Parse the command to extract the product code
-if ($uninstallCommand -match "MsiExec\.exe\s+/[IX]\s*(\{[A-F0-9-]+\})") {
- $productCode = $Matches[1]
- $uninstallArgs = "/X $productCode /qn /norestart"
- $uninstallCommand = "MsiExec.exe"
-} else {
- Write-Host "Error: Unable to parse uninstall command: $uninstallCommand"
- Exit 1
-}
+$uninstallCommand = "MsiExec.exe"
+$uninstallArgs = "/X $productCode /qn /norestart"
Write-Host "Uninstall command: $uninstallCommand"
Write-Host "Uninstall args: $uninstallArgs" |
|
@copilot resolve the merge conflicts in this pull request |
The merge conflicts are resolved in merge commit |
|
@copilot resolve the merge conflicts in this pull request |
…ic-davinci-ffea88 # Conflicts: # ee/maintained-apps/outputs/adobe-acrobat-pro/windows.json Co-authored-by: lukeheath <2495927+lukeheath@users.noreply.github.com>
14bd6ca
Merged the latest |
Script Diff Resultsee/maintained-apps/outputs/adobe-acrobat-pro/windows.json=== Install Script (no changes) ===
=== Uninstall // c94fe3ab -> 0260be3f ===
--- /tmp/old.OsS0NN 2026-10-20 19:25:12.976363771 +0000
+++ /tmp/new.nDSj8n 2026-10-20 19:25:12.976363771 +0000
@@ -1,30 +1,9 @@
-# Locate Adobe Acrobat Pro uninstaller from registry and execute it silently.
-# DisplayName is "Adobe Acrobat DC (64-bit)" on DC installs and may be "Adobe Acrobat (64-bit)" on others.
+# Uninstalls Adobe Acrobat Pro (64-bit) by its MSI product code. Acrobat Reader 64-bit
+# registers the same DisplayName and publisher, so matching on name could remove Reader.
-$displayNames = @("Adobe Acrobat (64-bit)", "Adobe Acrobat DC (64-bit)")
-$publisher = "Adobe"
+$productCode = '{AC76BA86-1033-FFFF-7760-BC15014EA700}'
-$paths = @(
- 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'
-)
-
-$uninstall = $null
-foreach ($p in $paths) {
- $items = Get-ItemProperty "$p\*" -ErrorAction SilentlyContinue | Where-Object {
- $dn = $_.DisplayName
- if (-not $dn) { return $false }
- if ($publisher -ne "" -and $_.Publisher -ne $publisher) { return $false }
- foreach ($d in $displayNames) {
- if ($dn -eq $d -or $dn -like "$d*") { return $true }
- }
- $false
- }
- if ($items) { $uninstall = $items | Select-Object -First 1; break }
-}
-
-if (-not $uninstall -or -not $uninstall.UninstallString) {
+if (-not (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$productCode")) {
Write-Host "Uninstall entry not found"
Exit 0
}
@@ -34,16 +13,8 @@
Stop-Process -Name $proc -Force -ErrorAction SilentlyContinue
}
-$uninstallCommand = $uninstall.UninstallString
-
-if ($uninstallCommand -match "MsiExec\.exe\s+/[IX]\s*(\{[A-F0-9-]+\})") {
- $productCode = $Matches[1]
- $uninstallArgs = "/X $productCode /qn /norestart"
- $uninstallCommand = "MsiExec.exe"
-} else {
- Write-Host "Error: Unable to parse uninstall command: $uninstallCommand"
- Exit 1
-}
+$uninstallCommand = "MsiExec.exe"
+$uninstallArgs = "/X $productCode /qn /norestart"
Write-Host "Uninstall command: $uninstallCommand"
Write-Host "Uninstall args: $uninstallArgs"ee/maintained-apps/outputs/adobe-acrobat-reader/windows.json=== Install Script (no changes) ===
=== Uninstall // 3bb10c80 -> d3c91b2b ===
--- /tmp/old.Sk4YrB 2026-10-20 19:25:13.029363638 +0000
+++ /tmp/new.dPwtF1 2026-10-20 19:25:13.029363638 +0000
@@ -1,45 +1,20 @@
-# Attempts to locate Adobe Acrobat Reader uninstaller from registry and execute it silently
+# Uninstalls Adobe Acrobat Reader (64-bit) by its MSI product code. Acrobat Pro 64-bit
+# registers the same DisplayName and publisher, so matching on name could remove Pro.
-$displayName = "Adobe Acrobat (64-bit)"
-$publisher = "Adobe"
+$productCode = '{AC76BA86-1033-FF00-7760-BC15014EA700}'
-$paths = @(
- 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall',
- 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'
-)
-
-$uninstall = $null
-foreach ($p in $paths) {
- $items = Get-ItemProperty "$p\*" -ErrorAction SilentlyContinue | Where-Object {
- $_.DisplayName -and ($_.DisplayName -eq $displayName -or $_.DisplayName -like "$displayName*") -and ($publisher -eq "" -or $_.Publisher -eq $publisher)
- }
- if ($items) { $uninstall = $items | Select-Object -First 1; break }
-}
-
-if (-not $uninstall -or -not $uninstall.UninstallString) {
+if (-not (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$productCode")) {
Write-Host "Uninstall entry not found"
Exit 0
}
-# Kill any running Acrobat Reader processes before uninstalling
$acrobatProcesses = @("AcroRd32", "Acrobat", "RdrCEF")
foreach ($proc in $acrobatProcesses) {
Stop-Process -Name $proc -Force -ErrorAction SilentlyContinue
}
-$uninstallCommand = $uninstall.UninstallString
-
-# Adobe typically uses MsiExec for uninstall
-# Parse the command to extract the product code
-if ($uninstallCommand -match "MsiExec\.exe\s+/[IX]\s*(\{[A-F0-9-]+\})") {
- $productCode = $Matches[1]
- $uninstallArgs = "/X $productCode /qn /norestart"
- $uninstallCommand = "MsiExec.exe"
-} else {
- Write-Host "Error: Unable to parse uninstall command: $uninstallCommand"
- Exit 1
-}
+$uninstallCommand = "MsiExec.exe"
+$uninstallArgs = "/X $productCode /qn /norestart"
Write-Host "Uninstall command: $uninstallCommand"
Write-Host "Uninstall args: $uninstallArgs" |


Related issue: NA
The Adobe Acrobat Pro and Reader Windows Fleet-maintained apps can't tell each other apart on a host:
Why the old queries were wrong
FMA queries run as-is on the host.
existsbecomes the automatic-install policy (sync.go→AutomaticInstallQuery→automatic_policy.FMAInstallerMetadata.PolicyQuery), andpatchedbecomes the patch policy (patch_policy.GenerateFromInstallerusesinstaller.PatchQuery). osquery evaluates both against the rawprogramstable.Pro matched
name = 'Adobe Acrobat DC (64-bit)'. That's the name inventory shows, but only because thewindows_acrobat_dcsoftware override inserver/service/osquery_utils/queries.goinserts " DC" server-side. The raw DisplayName isAdobe Acrobat (64-bit):Found app: 'Adobe Acrobat (64-bit)' at C:\Program Files\Adobe\Acrobat DC\, Version: 26.002.21931. It only found Pro through theinstall_locationfallback.Product Name: Adobe Acrobat (64-bit)once the bundled.mspis applied. The base MSI's ProductName isAdobe Acrobat DC (64-bit), so only pre-rebrand installs carry the DC name.Reader matched
name = 'Adobe Acrobat (64-bit)' AND publisher = 'Adobe', which is also exactly what Pro reports.What tells them apart
I read the MSI tables of both products'
AcroPro.msi: Pro fromAcrobat_DC_Web_x64_WWMUI.zip(sha2564e9b0b97…) and Reader fromAcroRdrDCx642600221931_MUI.exe(sha256d5f1db0c…).{AC76BA86-1033-FFFF-7760-BC15014EA700}{AC76BA86-1033-FF00-7760-BC15014EA700}{AC76BA86-0000-0000-7760-7E8A45000000}DCDC[INSTALLDIR]Acrobat\Acrobat.exeprograms.identifying_number, and I applied every language transform in each package (26 in both): the ProductCode never changes.HKLM\SOFTWARE\Adobe\Adobe Acrobat\DC\InstallPathfrom an unconditional component in the coreRegistriesfeature, so the key can't tell them apart.Changes
exists_querykeyed on each app's own ProductCode. Reader's output was regenerated withgo run ./cmd/maintained-apps -slug adobe-acrobat-reader/windows. Only its queries and uninstall ref changed.main's file with the ingester's encoder is byte-identical. The newpatchedquery and uninstall ref come from the ingester's own helpers (GenerateQueryForManifest,PackageIDRegex,GetScriptRef)."Adobe Acrobat Pro"and"Adobe Acrobat Reader"→= 'acrobat.exe'towindowsOpenQueryOverrides. The previousadobe acrobat pro.exeandadobe acrobat reader.exedon't exist in either package. I left outacrotray.exe, because the Distiller tray helper stays resident and would keep a host "open" indefinitely.$productCode = $PACKAGE_ID, which the ingester fills with the manifest ProductCode. The script checks thatHKLM:\...\Uninstall\$productCodeexists, then runsmsiexec /X. The process kill and msiexec wait loop are unchanged.Reader on a Pro host
With these changes Reader's automatic-install policy fails on a Pro host, so Fleet will try to install Reader there once (policy automations fire on newly failing results,
osquery.go:3062). That attempt aborts without touching Pro. Reader's MSI detects any same-UpgradeCode product ≥ 21.001.20135 (UT_FR), andOlderOverNewerAbortruns on a fresh silent install when it's set.The alternative is to count Pro as Reader in
exists. That would also make Reader's patch policy evaluate Pro's version, becausepatchedis generated fromexistsand the declaredpatch_policy_pathinput field is never read. I kept Reader's queries Reader-only.unique_identifierleft unchangedReader hosts also get renamed to
Adobe Acrobat DC (64-bit)in inventory. On top of that,software_windowsreportsprograms.upgrade_code, and both products share an UpgradeCode, so Pro and Reader hosts already share one inventory title. Pointing Reader'sunique_identifierat the DC name would put both FMAs on the same title.checkConflictingFleetMaintainedAppExistswould then reject adding both to one fleet, which breaks setups like Reader for everyone and Pro for a labeled group. Separating them in inventory needs a change to the override or title matching, which is out of scope here.Interaction with #54306
That bot PR (now merged) bumped Pro to
26.002.21931and froze its input. I mergedmainin and rebuilt the Pro output frommain's copy. Version, sha256 (4e9b0b97…), install ref and"frozen": trueall come from #54306. This PR changes only the queries and the uninstall script and ref, andpatchedis regenerated against26.002.21931.Also noticed, not changed
The Pro install script exits 0 without installing anything on Windows on ARM. The x64 package's
AbortPatchOnUnsupportedOSaction blocks the install, andsetup.exereturns 0 anyway.Checklist for submitter
SELECT *is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters.Testing
pkg/patch_policy/patch_policy_test.gonow checks that both Acrobat titles generate theacrobat.exeopen query, and that a ProductCode-keyed exists query (braced GUID) generates the expectedpatchedquery.On a Windows 11 VM with osquery 5.23.1, I created Uninstall entries that mirror what the MSIs write (key = ProductCode, DisplayName, Publisher
Adobe, DisplayVersion) and ran the shipped queries. The x64 packages won't install on ARM64. "row" means the query returned a row, which forexistsmeans detected and forpatchedmeans passing:For comparison, Pro's old
existsreturned no row for any rebranded Pro. Its oldpatchedpassed on outdated Pro.I ran the exact uninstall scripts from both outputs'
refsagainst the same entries. Exit 1605 is expected, because the entries aren't real MSI registrations:/X {…FFFF…}(1605)/X {…FF00…}(1605)For
open, a stand-inAcrobat.exeprocess made the new query fail while it ran and pass once it stopped. The old query passed in both cases.go test ./pkg/patch_policy/... ./ee/maintained-apps/... ./server/mdm/maintainedapps/... ./cmd/maintained-apps/...andmake lint-go-incrementalpass. The Windows FMA CI job does a real x64 install and uninstall of Reader with the new scripts.AI
AI: Claude Code (claude-opus-5-5)
Summary by CodeRabbit