Microsoft 365 / Office - Updating
-
Updating your Microsoft 365 installations using Custom Software is very easy.
We have made the below simple sample code, which will update it in a safe manner.
You may want to alter this:
/update user displaylevel=false forceappshutdown=falseThe displaylevel can be set to true, then the user will see a popup.
And you would be able to close the apps by changing forceappshutdown to true. Our tests shows that this is safe, as it doesn't close the apps, if people have unsaved documents open. However, please test this on a few hosts, before doing this across the entire company network.
$path64 = "C:\Program Files\Common Files\microsoft shared\ClickToRun" $path32 = "C:\Program Files (x86)\Common Files\microsoft shared\ClickToRun" $file = "OfficeC2RClient.exe" $arguments = "/update user displaylevel=false forceappshutdown=false" function updateOffice ($clicktorun, $arguments) { Start-Process -PassThru -FilePath $clicktorun -ArgumentList $arguments } if (Test-Path -LiteralPath "$path32\$file" -PathType Leaf -ErrorAction SilentlyContinue) { updateOffice -clicktorun $path32\$file -arguments $arguments } elseif (Test-Path -LiteralPath "$path64\$file" -PathType Leaf -ErrorAction SilentlyContinue) { updateOffice -clicktorun $path64\$file -arguments $arguments } else { Write-Host "Error: $file not found in default locations, aborting." }NOTE: A signed edition of the script can be found here:
https://stream.vulndetect.com/e/update-office.ps1Remember to select All files:


-
T Tom moved this topic from [Custom Software guide drafts] on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login