Install Multiple Office patches/Exe

This topic contains 4 replies, has 3 voices, and was last updated by  H Man 2 years, 5 months ago.

  • Author
    Posts
  • #24065

    Hi

    I am trying to install multiple office patches that are missing. As these patches come as exe wusa.exe would not work.

    Below is the script I put together but am not able to get it to work.

    Could any one help or tell me what I am doing wrong.

    [attachment file="Install-EXE.txt"]

  • #24067

    Jason Wasser
    Participant

    What part of the script isn't working?

    You could change line four to -Pattern "*.exe" and remove line 5 altogether.

    • #24080

      Hi Jason,

      $install = [System.Diagnostics.Process]::Start( $parameters )

      This were I am having trouble.

      $parameters has the full path of the exe and the required silent and no restart command line switch

      Thanks !!

  • #24082

    Jason Wasser
    Participant

    Any errors?

    Can you try using Start-Process -Wait?

    Start-Process -FilePath $FullName -Parameters $Parameters -Wait

  • #24117

    H Man
    Participant

    this works great

    If you copy the file locally 1st . you can use Invoke-command to kick it off

    
        $i = 1
    ForEach ($pc in $OnlineOnly) 
    {
    #Progress
    Write-Progress -Activity "Updating IE ..." -status "Working on : $($c.Computername) " -percentComplete ($i / $OnlineOnly.count*100)
    Write-Host "Starting  #$($i): $($pc.Computername) " -ForegroundColor Green
    
    #Variables
    $path =  "\\$($pc.computername)\c$\windows\temp\IE10-Setup-Full.msi"
    $install = "/q /log \\$($pc.computername)\c$\windows\temp\IE10UpGrade.txt"
    
    #scriptBlock
    $scriptBlock = {
    param ($Path,$Install)
     Start-Process $Path -ArgumentList @($Install) -Verbose -PassThru
    }
    
    #Execute Remote Command
    Invoke-Command -ComputerName $($pc.computername) -ScriptBlock $scriptBlock -ArgumentList ($path, $install) -Credential $cred -Verbose
    
    $i++
    }#Foreach
    
    

You must be logged in to reply to this topic.