Hi As of acrobat drops support on x versions id like to make a script for our monitoring system.
Currently i have:
$FullFolderPath = 'C:\Program Files (x86)\Adobe Reader DC';
$FolderName = (Split-Path $FullFolderPath -Leaf).ToString();
$DashIndex = $FolderName.IndexOf('Re');
$FolderNameFromDashToEnd = $FolderName.SubString($DashIndex);
$ADDC = "Reader DC"
if (($ADDC) -notcontains $FolderNameFromDashToEnd){
Write-Host "End of Support $adobeversion"
Exit 1010
}
else {
Write-Host "Adobe $FolderNameFromDashToEnd"
Exit 0
}
But i have both C:\Program Files (x86)\Adobe\Acrobat 2017 and C:\Program Files (x86)\Adobe\Acrobat Reader DC.
There are multiple version so i need to exclude all but reader dc folder. Does anyone know a good hack for this?
Expect: If folder acrobat* excist but its not acrobat reader dc, then:
I also tried several options with:
$acrobatversion = Get-Childitem "C:\Program Files (x86)\Adobe\Acrobat*" | Select-Object @{Name="Name"; Expression = {$_.Name}}
$acrobatversion
But it just enlist the two acrobat folders