Deploying LibreOffice with Powershell into a VM image

Hi all,

I’m trying to install the LibreOffice MSI via Powershell and it seems to be silently failing, got the script from [Deployment and Migration - The Document Foundation Wiki] (sub-heading: Example 1)

Windows SKU I’m trying to deploy to is “win10-21h2-ent”
LibreOffice version I’m trying to install - 7.3.7.2 (x86_64)

Just wondering if any of the parameters in the REMOVE property may be causing the issue? The script I’m using is:

Write-Output "INFO: Download and install Libre Office" Invoke-WebRequest -OutFile "LibreOffice.msi" -Uri "https://downloadarchive.documentfoundation.org/libreoffice/old/7.3.7.2/win/x86_64/LibreOffice_7.3.7.2_Win_x64.msi" if(Test-Path "$TempFolder\LibreOffice.msi" -PathType "Leaf"){ Write-Output "INFO: Libre Office MSI downloaded - attempting install" msiexec /qb /i "$TempFolder\LibreOffice.msi" /quiet /L*v LibreOffice_install_log.txt UI_LANGS=en_GB ISCHECKFORPRODUCTUPDATES=0 REBOOTYESNO=No ADDLOCAL=ALL REMOVE=gm_o_Onlineupdate,gm_r_ex_Dictionary_Af,gm_r_ex_Dictionary_An,gm_r_ex_Dictionary_Ar,gm_r_ex_Dictionary_Be,gm_r_ex_Dictionary_Bg,gm_r_ex_Dictionary_Bn,gm_r_ex_Dictionary_Br,gm_r_ex_Dictionary_Pt_Br,gm_r_ex_Dictionary_Pt_Pt,gm_r_ex_Dictionary_Ca,gm_r_ex_Dictionary_Cs,gm_r_ex_Dictionary_Da,gm_r_ex_Dictionary_Nl,gm_r_ex_Dictionary_Et,gm_r_ex_Dictionary_Gd,gm_r_ex_Dictionary_Gl,gm_r_ex_Dictionary_Gu,gm_r_ex_Dictionary_De,gm_r_ex_Dictionary_He,gm_r_ex_Dictionary_Hi,gm_r_ex_Dictionary_Hu,gm_r_ex_Dictionary_It,gm_r_ex_Dictionary_Lt,gm_r_ex_Dictionary_Lv,gm_r_ex_Dictionary_Ne,gm_r_ex_Dictionary_No,gm_r_ex_Dictionary_Oc,gm_r_ex_Dictionary_Pl,gm_r_ex_Dictionary_Ro,gm_r_ex_Dictionary_Ru,gm_r_ex_Dictionary_Si,gm_r_ex_Dictionary_Sk,gm_r_ex_Dictionary_Sl,gm_r_ex_Dictionary_El,gm_r_ex_Dictionary_Es,gm_r_ex_Dictionary_Sv,gm_r_ex_Dictionary_Te,gm_r_ex_Dictionary_Th,gm_r_ex_Dictionary_Vi,gm_r_ex_Dictionary_Zu } else { Write-Output "INFO: Libre Office MSI was not downloaded - install attempt failed" }

I don’t know how “stable” you need your links to be, but note that downloadarchive is not mirrored anywhere, and IIRC, it is throttled, so you are likely to get a poor download speed. Given that you likely would deploy to many systems, I’d expect a sysadmin to use a local store, and download from there to client systems, not download from web every time.

Why use two different “quiet” options? Not that it should matter, though.

Thanks for the info on the DownloadArchive, the script is inherited technical debt and I’ve been given the unfortunate task of finding out why LibreOffice is refusing to install on our images. Having no Powershell experience is definitely not doing me any favours.

You create the log file. When the operation fails, especially when the failure is silent, I would suggest to look into the log :wink:

Yea kinda feel stupid not reading the script clearly enough…

Anyway the problem wasn’t anything to do with the silent install. The script I posted in my question was part of a greater whole (aka. the “main” script), the main script was moving on before the install process could really finish, thereby cancelling out the installation.

So the solution was really simple: added a Start-Sleep cmdlt right after the line: “msiexec /qb /i “$TempFolder\LibreOffice.msi” /quiet /L*v LibreOffice_install_log.txt … etc” and Libre Office is now installed properly.

1 Like