Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

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|improve this answer

It is possible to do with batch scripting, either by checking a reg key or looking for the file on disk and getting its version with filever.exe.

But to be honest, I think the easiest way is to use audit software, WinAudit is freeware, just add it the the logon script of the client machines.

Because you specifically asked about batch scripting, this will query the reg key, you will need to loop it though all the workstations on your domain:

reg query "\\[hostname or IP]\HKLM\SOFTWARE\Adobe\Acrobat Reader"

You will need to check the HKLM key, as the HKCU can only be easily accessed by the machine's current user.

share|improve this answer

Shavlik is a great tool for deployment and software state awareness.

It also has reporting functions (which I didn't get into when I used it) but which should be quite capable of presenting you with an exportable report of what versions of Adobe Reader are in your environment.

According to the documentation:
- Reporting Overview
- Exporting reports

You'll need to go to Tools - Create Report. Under Asset Reports there should be a report available titled Software Catalog. Run this.

Then export the report by selecting File - Export, choose the relevant report, and Save.

It shouldn't be too hard to filter this report in Excel for the appropriate and desired software types as it should contain both software name and version fields.

Shavlik is quite accurate in it's software awareness and I have not found it too prone to errors or false information.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.