Adobe Install

Welcome Forums General PowerShell Q&A Adobe Install

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
7 months ago.

  • Author
    Posts
  • #100824

    Participant
    Points: 12
    Rank: Member

    Howdy Guys!
    I am stuck with the Acrobat Reader verification and Installation script
    The code needs to
    1. Ensure that Acrobat Reader has been installed. The minimum version is 9.5 If it is not installed, install it using the installer on E:\ Acrobat Reader W2008
    2. Attach screenshots.

    I used the code as below but it isnt working out

    $tempdir = Get-Location
    $tempdir = $tempdir.tostring()
    $appToMatch = '*Acrobat Reader*'
    #$msiFile = $tempdir+"ADR.exe"
    #The below location should be the location of the Acrobat File
    $msiFile = C:\Temp\ADR.exe

    $msiArgs = "-qb"

    function Get-InstalledApps
    {
    if ([IntPtr]::Size -eq 4) {
    $regpath = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*'
    }
    else {
    $regpath = @(
    HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*'
    HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
    )
    }
    Get-ItemProperty $regpath | .{process{if($_.DisplayName -and $_.UninstallString) { $_ } }} | Select DisplayName, Publisher, InstallDate, DisplayVersion, UninstallString |Sort DisplayName
    }

    $result = Get-InstalledApps | where {$_.DisplayName -like $appToMatch}

    If ($result -eq $null) {
    (Start-Process -FilePath $msiFile -ArgumentList $msiArgs -Wait -Passthru).ExitCode
    }

    Please assist.

  • #100846

    Participant
    Points: 195
    Helping Hand
    Rank: Participant

    Not a direct answer.
    But if you do this on a regular basis on many machines, then it's probably better to look into a tool for software deployment.
    Rather than scripting it manually.

    Either via more conventional stuff like Microsoft SCCM or you can use something like Chocolatey.
    Chocolatey uses a more linux-like/repository approach and you can use it with different configuration tools like Puppet, Powershell DSC etc or stand-alone.

The topic ‘Adobe Install’ is closed to new replies.