This project is read-only.

Software Version Validation prior installtion

Topics: Archive - General
Nov 10, 2013 at 2:35 AM
Hi guys,

not sure if anyone is trying to do this or not , but what i am trying to do is to deploy multiple softwares at once and have the PSTOOLKIT to check and compare versions of software for each software with the target workstations. If the version of deploying software is equal or greater than the software installed on the target workstation then skip that software. If not or the installed software is less then the deploying version , install the deploying software or uninstall the older version and install the deploying software.

i am not too sure if this would be a new function , new feature , or it can be accomplished with the existing functions.
Nov 11, 2013 at 2:10 PM
Hey,

I do this sort of thing all the time. Here's an example of how you can check for and update Adobe Reader and Flash Player Plugin / ActiveX. It's just a matter of getting the relevant registry keys. If the installed version is lower, uninstall it and install the new.
    # Adobe Reader 11.0.04
    $AdobeReaderVersion = Get-FileVersion "$envProgramFilesX86\Adobe\Reader 11.0\Reader\AcroRd32.exe"
    If ($AdobeReaderVersion -lt "11.0.04.63") {
        Show-InstallationProgress "Installing Adobe Reader 11.0.04. Please wait..."
        Remove-MSIApplications "Adobe Reader XI"
        Execute-MSI -Action Install -Path "$dirFiles\AdobeReader11.0.04\Adobe_Reader_11.0.04_EN_01.msi" -Transform "$dirFiles\AdobeReader11.0.04\Adobe_Reader_11.0.04_EN_01.mst"
        Execute-MSI -Action Patch -Path "$dirFiles\AdobeReader11.0.04\AdbeRdrUpd11004.msp" 
        Execute-MSI -Action Install -Path "$dirFiles\AdobeReader11.0.04\Fontpacks\Adobe_ExtendedAsianFontPacks_11.0.04_EN_01.msi" -Transform "$dirFiles\AdobeReader11.0.04\Fontpacks\Adobe_ExtendedAsianFontPacks_11.0.04_EN_01.mst"
    }

    # Adobe Flash Player Plugin 11.8.800.168
    $AdobeFlashPlayerPluginVersion = Get-RegistryKey "HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayerPlugin" | Select "Version" -ExpandProperty "Version" 
    If ($AdobeFlashPlayerPluginVersion -lt "11.8.800.168") {
        Show-InstallationProgress "Installing Adobe Flash Player Plugin 11.8.800.168. Please wait..."
        Remove-MSIApplications "Adobe Flash Player 11 Plugin"
        Execute-MSI -Action Install -Path "$dirFiles\AdobeFlashPlayerPlugin11.8.800.168\Adobe_FlashPlayer11Plugin_11.8.800.168_EN_01.msi" -Transform "$dirFiles\AdobeFlashPlayerPlugin11.8.800.168\Adobe_FlashPlayer11Plugin_11.8.800.168_EN_01.mst"
    }

    # Adobe Flash Player ActiveX 11.8.800.174
    $AdobeFlashPlayerActiveXPlugin = Get-RegistryKey "HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayerActiveX" | Select "Version" -ExpandProperty "Version" 
    If ($AdobeFlashPlayerActiveXPlugin -lt "11.8.800.174") {
        Show-InstallationProgress "Installing Adobe Flash Player ActiveX 11.8.800.174. Please wait..."
        Remove-MSIApplications "Adobe Flash Player 11 ActiveX"
        Execute-MSI -Action Install -Path "$dirFiles\AdobeFlashPlayerActiveX11.8.800.174\Adobe_FlashPlayer11ActiveX_11.8.800.174_EN_01.msi" -Transform "$dirFiles\AdobeFlashPlayerActiveX11.8.800.174\Adobe_FlashPlayer11ActiveX_11.8.800.174_EN_01.mst"
    }
Hope this helps!

Cheers, Dan
Nov 25, 2013 at 2:24 AM
thanks for the info, will try it out and revert back