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.

link|improve this question

62% accept rate
feedback

3 Answers

The easiest way to do this may be with powershell. I'll see if I can get my co-worker to release the code. What I do have to add is that the HKLM node will not have all the subkeys but if you make them there it works fine.

Ok, so he released the code. 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 }

link|improve this answer
feedback

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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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