Install Multiple Office patches/Exe

This topic contains 4 replies, has 3 voices, and was last updated by Profile photo of H Man H Man 1 year, 6 months ago.

  • Author
  • #24065


    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
    Profile photo of Jason Wasser
    Jason Wasser

    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
    Profile photo of Jason Wasser
    Jason Wasser

    Any errors?

    Can you try using Start-Process -Wait?

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

  • #24117
    Profile photo of H Man
    H Man

    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) 
    Write-Progress -Activity "Updating IE ..." -status "Working on : $($c.Computername) " -percentComplete ($i / $OnlineOnly.count*100)
    Write-Host "Starting  #$($i): $($pc.Computername) " -ForegroundColor Green
    $path =  "\\$($pc.computername)\c$\windows\temp\IE10-Setup-Full.msi"
    $install = "/q /log \\$($pc.computername)\c$\windows\temp\IE10UpGrade.txt"
    $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

You must be logged in to reply to this topic.