Skip to content

Fix Adobe Acrobat Pro and Reader (Windows) FMA queries and uninstall scripts - #54321

Merged
allenhouchins merged 8 commits into
mainfrom
allenhouchins/nostalgic-davinci-ffea88
Oct 20, 2026
Merged

allenhouchins merged 8 commits into
mainfrom
allenhouchins/nostalgic-davinci-ffea88

Conversation

@allenhouchins

@allenhouchins allenhouchins commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Related issue: NA

The Adobe Acrobat Pro and Reader Windows Fleet-maintained apps can't tell each other apart on a host:

  • Pro: the exists/patched queries never matched a real host. The automatic-install policy kept failing on hosts that already had Pro, and the patch policy passed on outdated Pro.
  • Reader: the queries also matched Pro hosts, so an outdated Pro failed Reader's patch policy.
  • Uninstall scripts: both chose the first ARP entry named "Adobe Acrobat (64-bit)", so uninstalling one product could remove the other.
  • Open queries: both looked for executables that don't exist.

Why the old queries were wrong

FMA queries run as-is on the host. exists becomes the automatic-install policy (sync.go → AutomaticInstallQuery → automatic_policy.FMAInstallerMetadata.PolicyQuery), and patched becomes the patch policy (patch_policy.GenerateFromInstaller uses installer.PatchQuery). osquery evaluates both against the raw programs table.

Pro matched name = 'Adobe Acrobat DC (64-bit)'. That's the name inventory shows, but only because the windows_acrobat_dc software override in server/service/osquery_utils/queries.go inserts " DC" server-side. The raw DisplayName is Adobe Acrobat (64-bit):

  • The FMA validator on a real x64 runner (run 36576324752) logs Found app: 'Adobe Acrobat (64-bit)' at C:\Program Files\Adobe\Acrobat DC\, Version: 26.002.21931. It only found Pro through the install_location fallback.
  • The MSI log for the exact package Fleet ships reports Product Name: Adobe Acrobat (64-bit) once the bundled .msp is applied. The base MSI's ProductName is Adobe 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 from Acrobat_DC_Web_x64_WWMUI.zip (sha256 4e9b0b97…) and Reader from AcroRdrDCx642600221931_MUI.exe (sha256 d5f1db0c…).

Pro Reader 64-bit
ProductCode {AC76BA86-1033-FFFF-7760-BC15014EA700} {AC76BA86-1033-FF00-7760-BC15014EA700}
UpgradeCode {AC76BA86-0000-0000-7760-7E8A45000000} same
RegistryHiveName DC DC
Main executable (Shortcut target) [INSTALLDIR]Acrobat\Acrobat.exe same
  • ProductCode works as the discriminator. osquery exposes it as programs.identifying_number, and I applied every language transform in each package (26 in both): the ProductCode never changes.
  • The registry key doesn't. Both write HKLM\SOFTWARE\Adobe\Adobe Acrobat\DC\InstallPath from an unconditional component in the core Registries feature, so the key can't tell them apart.

Changes

  • Queries (both apps): added an exists_query keyed on each app's own ProductCode. Reader's output was regenerated with go run ./cmd/maintained-apps -slug adobe-acrobat-reader/windows. Only its queries and uninstall ref changed.
  • Pro output: hand-edited, because the input is frozen. I checked that re-encoding main's file with the ingester's encoder is byte-identical. The new patched query and uninstall ref come from the ingester's own helpers (GenerateQueryForManifest, PackageIDRegex, GetScriptRef).
  • Open queries: added "Adobe Acrobat Pro" and "Adobe Acrobat Reader" → = 'acrobat.exe' to windowsOpenQueryOverrides. The previous adobe acrobat pro.exe and adobe acrobat reader.exe don't exist in either package. I left out acrotray.exe, because the Distiller tray helper stays resident and would keep a host "open" indefinitely.
  • Uninstall scripts (both apps): the DisplayName lookup and UninstallString parsing are replaced with $productCode = $PACKAGE_ID, which the ingester fills with the manifest ProductCode. The script checks that HKLM:\...\Uninstall\$productCode exists, then runs msiexec /X. The process kill and msiexec wait loop are unchanged.
Pro     exists:  SELECT 1 FROM programs WHERE identifying_number = '{AC76BA86-1033-FFFF-7760-BC15014EA700}' AND publisher = 'Adobe';
Reader  exists:  SELECT 1 FROM programs WHERE identifying_number = '{AC76BA86-1033-FF00-7760-BC15014EA700}' AND publisher = 'Adobe';
both    open:    SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM processes WHERE LOWER(name) = 'acrobat.exe');

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), and OlderOverNewerAbort runs 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, because patched is generated from exists and the declared patch_policy_path input field is never read. I kept Reader's queries Reader-only.

unique_identifier left unchanged

Reader hosts also get renamed to Adobe Acrobat DC (64-bit) in inventory. On top of that, software_windows reports programs.upgrade_code, and both products share an UpgradeCode, so Pro and Reader hosts already share one inventory title. Pointing Reader's unique_identifier at the DC name would put both FMAs on the same title. checkConflictingFleetMaintainedAppExists would 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.21931 and froze its input. I merged main in and rebuilt the Pro output from main's copy. Version, sha256 (4e9b0b97…), install ref and "frozen": true all come from #54306. This PR changes only the queries and the uninstall script and ref, and patched is regenerated against 26.002.21931.

Also noticed, not changed

The Pro install script exits 0 without installing anything on Windows on ARM. The x64 package's AbortPatchOnUnsupportedOS action blocks the install, and setup.exe returns 0 anyway.

Checklist for submitter

  • Input data is properly validated, 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

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

pkg/patch_policy/patch_policy_test.go now checks that both Acrobat titles generate the acrobat.exe open query, and that a ProductCode-keyed exists query (braced GUID) generates the expected patched query.

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 for exists means detected and for patched means passing:

Scenario Pro exists Pro patched Reader exists Reader patched Reader old exists Reader old patched
Pro 26.002.21931 row row - row row row
Pro 25.001.20844 (outdated) row - - row row -
Pro 22.003.20282 (DC name) row - - row - row
Reader 26.002.21931 - row row row row row
Reader 25.001.20844 (outdated) - row row - row -
No Acrobat - row - row - row

For comparison, Pro's old exists returned no row for any rebranded Pro. Its old patched passed on outdated Pro.

I ran the exact uninstall scripts from both outputs' refs against the same entries. Exit 1605 is expected, because the entries aren't real MSI registrations:

Host has Pro uninstall Reader uninstall
Pro /X {…FFFF…} (1605) "Uninstall entry not found" (0)
Reader "Uninstall entry not found" (0) /X {…FF00…} (1605)

For open, a stand-in Acrobat.exe process 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/... and make lint-go-incremental pass. 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

  • Bug Fixes
    • Improved Windows detection for Adobe Acrobat Pro and Reader using their matching product identifiers.
    • Improved recognition of running Acrobat processes for both apps.
    • Updated uninstall behavior to run quietly using each app’s Windows Installer entry. If an uninstall entry is unavailable, the process now exits successfully.

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.
@allenhouchins
allenhouchins requested a review from a team as a code owner September 29, 2026 14:49
Copilot AI balanced review requested due to automatic review settings September 29, 2026 14:49
fleet-release
fleet-release previously approved these changes Sep 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity · 1 Low severity

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.exe as 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.

Comment thread pkg/patch_policy/patch_policy.go Resolved
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: fleetdm/fleet/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2aea8aad-cd3f-4e26-b8ac-f696bc3f8d8e
📥 Commits

Reviewing files that changed from the base of the PR and between d1f86eb and 3a05b7d.

📒 Files selected for processing: 1
  • ee/maintained-apps/outputs/adobe-acrobat-reader/windows.json

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

Walkthrough

The Adobe Acrobat Pro and Reader Winget inputs add existence queries that match product GUIDs and publisher Adobe. The Windows records use those product codes for existence and patch queries, and check acrobat.exe for open processes. The uninstall scripts check the product-code registry key and invoke quiet MSI removal. The process override map and tests cover both Acrobat products.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 3a05b

The Reader detection and uninstall updates align with the documented machine-scoped installation. No actionable merge-blocking risk is established; the PR is ready for normal checks.

Security architecture risk: 🔵 Low · up to 40aec

Distinct MSI identifiers reduce the chance of confusing Acrobat Pro with Reader or removing the wrong product. No new security exposure was established, but registry lookup and removal recovery have not been fully validated on supported Windows installations.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated effect is endpoint-local: each Windows device receiving these maintained-app records changes its Acrobat policy matching and MSI removal target. The declared installation scope is x64 machine-wide, and the inspected changes do not introduce a new remote entrypoint.

Trust Boundaries and Controls

  • inferred — Host inventory remains an input to policy decisions, while repository-generated constants select the MSI removal target. ProductCode separation strengthens product ownership matching, and the publisher predicate remains in detection; neither predicate establishes cryptographic authenticity of host inventory.

Resilience and Maintainability Implications

  • observed — Product-specific removal does not make process termination product-specific: both scripts still stop shared Acrobat process names. This broader process effect predates the PR and is not retained as a newly introduced failure-containment concern.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main changes to the Adobe Acrobat Pro and Reader Windows FMA queries and uninstall scripts.
Description check Passed The description is complete and relevant. It explains the problem, the implementation, scope decisions, testing, manual QA, and AI tool usage. It also marks the applicable checklist items.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.05%. Comparing base (278d677) to head (14bd6ca).
⚠️ Report is 45 commits behind head on main.

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     
Flag Coverage Δ
backend 78.64% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…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.
@allenhouchins allenhouchins changed the title Fix Adobe Acrobat Pro (Windows) FMA exists/patched/open queries Fix Adobe Acrobat Pro and Reader (Windows) FMA queries and uninstall scripts Sep 29, 2026
fleet-release
fleet-release previously approved these changes Sep 29, 2026
…ic-davinci-ffea88

# Conflicts:
#	ee/maintained-apps/outputs/adobe-acrobat-pro/windows.json
@github-actions

Copy link
Copy Markdown
Contributor

Script Diff Results

ee/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"

fleet-release
fleet-release previously approved these changes Sep 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Script Diff Results

ee/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"

fleet-release
fleet-release previously approved these changes Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Script Diff Results

ee/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"

@lukeheath

Copy link
Copy Markdown
Member

@allenhouchins Conflicts need to be resolved.

@lukeheath
lukeheath marked this pull request as draft October 14, 2026 20:22
# Conflicts:
#	ee/maintained-apps/outputs/adobe-acrobat-reader/windows.json
@github-actions

Copy link
Copy Markdown
Contributor

Script Diff Results

ee/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"

@allenhouchins
allenhouchins marked this pull request as ready for review October 16, 2026 12:47
fleet-release
fleet-release previously approved these changes Oct 16, 2026
@lukeheath

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

lukeheath
lukeheath previously approved these changes Oct 16, 2026

Copilot AI commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

The merge conflicts are resolved in merge commit 3a05b7dd; the Reader manifest retains the updated main version and checksum alongside the PR’s query and uninstall changes. go test ./pkg/patch_policy/... passes.

@lukeheath

Copy link
Copy Markdown
Member

@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>
Copilot AI dismissed stale reviews from lukeheath and fleet-release via 14bd6ca October 19, 2026 22:21

Copilot AI commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merged the latest main and resolved the Acrobat Pro manifest conflict in commit 14bd6ca6. The manifest retains main’s current version/checksum and this PR’s ProductCode-based queries and uninstall ref.

@github-actions

Copy link
Copy Markdown
Contributor

Script Diff Results

ee/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"

@allenhouchins
allenhouchins merged commit 7728248 into main Oct 20, 2026
54 of 55 checks passed
@allenhouchins
allenhouchins deleted the allenhouchins/nostalgic-davinci-ffea88 branch October 20, 2026 20:15

This branch was previously deployed

1 inactive deployment
Docker Hub — 14bd6ca6 Deployed Oct 20, 2026 by Copilot via publish #109724
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants