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
}