Batch detect Adobe Reader version on multiple computers

8,523

The easiest way to do this may be with PowerShell. The HKLM node will not have all the subkeys but if you make them there it works fine.

This portion of the script grabs the version:

$SoftwareKey = "HKLM:\Software" 
if ((Get-WmiObject Win32_OperatingSystem).OSArchitecture -match "64-bit") { $SoftwareKey = "HKLM:\Software\WOW6432Node" } 

if (Test-Path "$SoftwareKey\adobe\Acrobat Reader") { 
$adobeversion = get-childitem "$SoftwareKey\adobe\Acrobat Reader" 
foreach ($version in $adobeversion) { 
Write-Output "Found verstion $($version.PSChildName) of Adobe Reader" 
} 
}

This was part of a larger script that automatically accepts the EULA when run after an update is applied which takes reader to a new version. The entire script is below:

$SoftwareKey = "HKLM:\Software" 
if ((Get-WmiObject Win32_OperatingSystem).OSArchitecture -match "64-bit") { $SoftwareKey = "HKLM:\Software\WOW6432Node" } 

if (Test-Path "$SoftwareKey\adobe\Acrobat Reader") { 
$adobeversion = get-childitem "$SoftwareKey\adobe\Acrobat Reader" 
foreach ($version in $adobeversion) { 
if ((Test-Path "$($version.PSPath)\AdobeViewer") -eq $false) {New-Item "$($version.PSPath)\AdobeViewer"} 
New-ItemProperty -Path "$($version.PSPath)\AdobeViewer" -PropertyType DWORD -Value 1 -Name EULA -force 
} 
Share:
8,523

Related videos on Youtube

Steve
Author by

Steve

Updated on September 18, 2022

Comments

  • Steve
    Steve over 1 year

    I want to scan for and build a list of versions of Adobe Reader installed on computers at one site in a domain.

    I'm using a demo of Shavlik Netchk (commercial software) which works well, but I'm thinking this task could be performed by a batch file.

    There are two registry keys to detect:

    1. HKEY_CURRENT_USER\SOFTWARE\Adobe\Acrobat Reader\10.0
    2. HKEY_CURRENT_USER\SOFTWARE\Adobe\Acrobat Reader\9.0

    I'm only a novice with Windows scripting.