Windows: Automatically update LibreOffice (PowerShell)

In case anyone might find it useful, here’s a PowerShell script I wrote that automatically downloads and updates LibreOffice on Windows:

https://gist.github.com/Bill-Stewart/501099066bccd9cc5c9f2efcb5d84cf8

You can schedule the script to run using the SYSTEM account. Create a folder for the downloads and the script, (e.g., C:\Installs\LibreOffice), copy the Update-LibreOffice.ps1 script to it, and schedule the script to run using the Task Scheduler:

Program/script: %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe

Add arguments (optional): -ExecutionPolicy Bypass -NonInteractive -NoProfile -File "C:\Installs\LibreOffice\Update-LibreOffice.ps1" "C:\Installs\LibreOffice" -EnableLogging -Install -Quiet

Of course, replace the C:\Installs\LibreOffice path with the name of the folder where you put the script and where you want the script to download the installer files.

I schedule this script to run once a week on Sundays, and it automatically downloads and installs the latest version of LibreOffice if the version it finds on the Internet is newer than the one that’s installed.

The -EnableLogging parameter tells the script to create a log file for later analysis if needed.

Nice. But this is basically obsoleted by the MAR-based automatic updates (they are no more experimental in 24.8, enabled by default in 24.8.1).

OTOH, I expect quite a few issues with MAR. So maybe this is a better option, after all.

1 Like

I wasn’t aware there was any way other than msi to install LibreOffice on Windows. If they’re going to provide updating outside of the msi mechanism, then you’re probably right that this may result in some odd and undesirable behaviors.