Error attempting to install LibreOffice 5.4.2

When I attempt to upgrade from LO 5.4.1 to 5.4.2 by running LibreOffice_5.4.2_Win_x64, the installation proceeds part way, then displays the error message: Error 1336. There was an error creating a temporary file that is needed to complete this installation.
Clicking OK rolls back and uninstalls LO. I re-ran the installation after rebooting the computer, and got the same result. I then re-installed version 5.4.1 successfully. Computer is an HP ProDesk 400, with Intel i3-6100, 4 GB RAM, Windows 10 Pro, version 1709. Any idea how to get 5.4.2 to install?

  1. It’s unusual problem; I’ve not met it before.
  2. You could try to uninstall 5.4.1 first.
  3. If it doesn’t help, please look at Computer management - Event log - Application, and look for relevant MsiInstaller messages with possible more details (e.g., telling which file had failed).

Windows error log

Good suggestions. I found the following error in the log file at least 3 times:
Product: LibreOffice – Error 1336.There was an error creating a temporary file that is needed to complete this installation. Folder: C:\Users\Public\Desktop. System error code: 2
This might be a permissions error. I found that C:\Users|Public\Desktop (which displays as Public Desktop in file explorer) only gave write permission to the file owner, which seems odd for a “Public” folder.

I have the following permissions on Win10 for C:\Users\Public\Desktop (all not inherited; inheritance is disabled):

  1. Administrators-allow-all;
  2. INTERACTIVE-allow-Read and Execute;
  3. System-allow-all;
  4. [My initial user]-allow-special (delete subfolders and files; delete); only for subfolders and files.

The restrictions for such shared elements is normal policy in multi-user OSes. But they must be setup correctly.

I found a work-around. Libre Office 5.4.2 installed correctly when I un-checked the “create icon on desktop” box. Apparently the installation had failed in previous attempts at the point where the installation attempted to create the icon on the desktop. It seems like failure to make a desktop icon is a trivial reason to crash the installation. It would be better to post an error message and then complete the installation.
I find that even with the permissions above I can’t save a file to the public desktop from an application. However, I can paste a file into the desktop from another directory. Odd.

Update 11/18/2017. The root problem is that Windows Defender Controlled Access won’t allow any application not on its whitelist to write to the desktop, documents, or several other folders. I have attempted to add LO to the whitelist, but adding soffice.exe, scalc.exe, swriter.exe, etc. didn’t solve the problem. Also, adding the LO installation program didn’t solve the icon creation problem. There must be another executable or script that needs to be added to the whitelist.

I tried your suggestion and indeed, Libre Office did install (Windows 10). However, could not get any part of it to run. Failed immediately. Anyone??

I expect the Windows Defender Controlled Access to write to Windows log on events, and maybe to Defender’s log as well, where you could look for details on which processes have been blocked. The icons are created by installer (msiexec, not LibreOffice executables).

Based on your findings (Windows Defender Controlled Access blocking access to directories required for installation), I advise you to simply turn off the Defender Controlled Access feature for the time of installation.

See why.

Thank you very much. I used the workaround in answer 2. It seems to have solved my problem and LibreOffice is doing what I ask of it. It is now pinned to my taskbar.