Bug 155408 - MSI Fails to install using silent install options
Summary: MSI Fails to install using silent install options
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
7.4.7.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/msi-ins...
Whiteboard:
Keywords:
Depends on:
Blocks: Installer-Windows
  Show dependency treegraph
 
Reported: 2023-05-19 13:34 UTC by Adam Clarke
Modified: 2023-05-24 19:40 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Clarke 2023-05-19 13:34:31 UTC
Description:
All of the recent MSI versions but specifically for us 7.4.7 fail when using the /q option or /quiet as it appears these parameters are no longer recognised and the installation hangs. We have tried the last few versions from the archive and it appears to be an issue with all of them. We have been using this parameter successfully for the past year on version 7.2.6 so it appears to be versions beyond this that are affected...

Steps to Reproduce:
1.Run installation using /q, /qn or /quiet parameters
2.
3.

Actual Results:
Installation just hangs and never completes

Expected Results:
Should have completed silent install procedure


Reproducible: Always


User Profile Reset: No

Additional Info:
Nothing else to report
Comment 1 Mike Kaganski 2023-05-21 09:56:22 UTC
As mentioned in https://ask.libreoffice.org/t/msi-installers-issue/91672, it is important to attach installation logs.
Comment 2 Adam Clarke 2023-05-21 14:17:20 UTC
Hi there. From what I can see the installation never begins so this is the reason I cannot provide logs for the process. The issue seems to affect all recent installers so I think there may be a significant issue with these...
Comment 3 Mike Kaganski 2023-05-21 14:51:00 UTC
(In reply to Adam Clarke from comment #2)

Did you try to create logs, as explained in the FAQ [1]? No matter if the installation completes; the log is being written from the first stage, and may contain important details.

[1] https://wiki.documentfoundation.org/Faq/General/General_Installation_Issues_(Windows)#Create_an_installation_log
Comment 4 Adam Clarke 2023-05-22 08:22:05 UTC
Hi, yes I have followed the link you provided and unfortunately it does not work as it also does not recognise the commands for logging appears to ignore any command used.
Comment 5 Mike Kaganski 2023-05-22 08:29:09 UTC
(In reply to Adam Clarke from comment #4)
> it also does not recognise the commands for logging appears to
> ignore any command used.

This is highly strange. The command line arguments are handled by *msiexec* executable, which is a Microsoft Windows component, part of Windows Installer service. It starts logging even before it reads anything from the MSI that is passed to it as an argument (in this case, a LibreOffice MSI).

So given all that, I'd suggest you to check integrity of your Windows, possibly starting with a MS troubleshooting tool, also linked from the FAQ referenced in comment 3.
Comment 6 Mike Kaganski 2023-05-22 09:04:29 UTC
FTR: just now, I uninstalled LibreOffice from my Windows 10 box, opened cmd.exe as Administrator, and run this exact command line:

> msiexec /i D:\Downloads\LibreOffice_7.5.3_Win_x86-64.msi /quiet

and it worked fine, installed LibreOffice with the default settings without any interaction / UI.
Comment 7 Adam Clarke 2023-05-22 09:12:44 UTC
Ok thankyou for your help. I am finding it bizzare that the old 7.2.6 installer works fine but same commands on the recent ones are not recognised. I have tried on multiple different standalone machines but interestingly all are Windows 10 22H2 so it could possibly be a bug in the latest OS version maybe? Something if definitely not right though.
Comment 8 Mike Kaganski 2023-05-22 09:26:46 UTC
(In reply to Adam Clarke from comment #7)
> interestingly all are Windows 10 22H2

Mine too: Version 22H2 (OS Build 19045.2846).
Comment 9 Adam Clarke 2023-05-22 09:30:30 UTC
Ok I think I am getting somewhere. It appears to be an elevation issue. The old msi 7.2.6 seems to work fine without elevation as do all other MSI's I use for other software however the new MSI's for the latest versions do not seem to work without elevation which causes the installation to fail and this is an issue when deploying using SCCM. I am now looking to see if there is a way I can force it to elevate the MSI when running to resolve my issue. Not sure why your latest installers are working differently though. If there is nothing you can do then please close this as a bug. Thankyou for your time...
Comment 10 Mike Kaganski 2023-05-22 10:07:58 UTC
(In reply to Adam Clarke from comment #9)
> It appears to be an elevation issue.

You do not describe the exact scenario you use, it seems to be a huge obstacle. Are you trying to install/advertize per-user?

Anyway, LibreOffice MSI installer has *always* required a per-machine installation, and had never provided a per-user installation option (which is the only way a non-elevated installation could succeed). The intended operation in this case is explained at https://learn.microsoft.com/en-us/windows/win32/msi/installing-a-package-with-elevated-privileges-for-a-non-admin. No idea how that relates to SCCM.

Also: is there a way to test your failure *on a standalone system*, not connected to a domain, not managed by SCCM? E.g., as I said in comment 6, I used an elevated command prompt to call msiexec. When I used a normal, unelevated cmd.exe, it obviously silently failed (and Windows Event Viewer registered an error 10005, telling that current user has no rights to continue installation). Has this scenario (or some other, that can be reproduced) worked for 7.2.6?
Comment 11 Mike Kaganski 2023-05-22 10:51:26 UTC
(In reply to Mike Kaganski from comment #10)
> When I used a normal,
> unelevated cmd.exe, it obviously silently failed (and Windows Event Viewer
> registered an error 10005, telling that current user has no rights to
> continue installation). Has this scenario (or some other, that can be
> reproduced) worked for 7.2.6?

FTR: I tested this scenario ('msiexec /i D:\Downloads\LibreOffice_7.5.3_Win_x86-64.msi /quiet' command line using a non-elevated command prompt) with 7.2.6, and it (expectedly) failed, with the same error 10005 in event log.
Comment 12 Mike Kaganski 2023-05-22 10:52:25 UTC
(In reply to Mike Kaganski from comment #11)
> FTR: I tested this scenario ('msiexec /i
> D:\Downloads\LibreOffice_7.5.3_Win_x86-64.msi /quiet' command line

Oh, of course, the command line was a bit different :)

> msiexec /i D:\Downloads\LibreOffice_7.2.6.2_Win_x64.msi /quiet
Comment 13 Adam Clarke 2023-05-22 12:04:23 UTC
Hi Mike

Sorry, poor choice of words. It is definitely the same issue as pmaynard I am having. When running in an SCCM task sequence it just hangs forever but if I add /norestart it fails and does not complete the task sequence. Iā€™m really stumped on this one. Have there been any changes to the installers you know of since 7.2.6?

I can however now confirm that when I run it on a standalone machine when using elevated command prompt it does in fact work though...
Comment 14 Adam Clarke 2023-05-22 12:05:12 UTC
I do appreciate your time looking at this for me though...
Comment 15 Mike Kaganski 2023-05-22 12:15:17 UTC
Jussi, I seem to remember you helped some recent changes to MSI installer - do you have an idea what could be the reason of this SCCM change between 7.2 and 7.4?
Comment 16 Mike Kaganski 2023-05-22 12:22:14 UTC
FTR: the changes mentioning "msi" after 7.2 branch-off are

https://gerrit.libreoffice.org/q/msi+branch:master+after:2021-06-07
Comment 17 Adam Clarke 2023-05-22 12:36:22 UTC
I wonder if it could be the changes made to the WiX toolset? That would be my guess?
Comment 18 Jussi Pakkanen 2023-05-22 14:15:57 UTC
> do you have an idea what could be the reason of this SCCM change between 7.2 and 7.4?

Sadly no. All the changes I have been a part of have dealt with the new WiX installer and not the old Perl monstrosity. I have no idea how that works internally.

> I wonder if it could be the changes made to the WiX toolset?

None of the existing production installers use WiX to build. So no, that is very unlikely to be the case. You can only obtain the WiX-based installer if you build the code from scratch yourself and explicitly enable the WiX installer. And even that is not possible until this MR gets merged:

https://gerrit.libreoffice.org/c/core/+/151738
Comment 19 Adam Clarke 2023-05-22 14:20:02 UTC
Hi Mike

As per your forum request I am slowly going through the archive and testing versions to see what works and what does not so I will let you know ASAP.

Thanks again...
Comment 20 Adam Clarke 2023-05-22 15:19:05 UTC
Hi there

We're there any changes after 7.2.6 as I have tried 7.2.7.2 and this also fails so it looks like the very next release is the issue
Comment 21 Mike Kaganski 2023-05-22 17:41:43 UTC
(In reply to Adam Clarke from comment #20)
> I have tried 7.2.7.2 and this also fails

Really great.

Could you please also test version 7.3.1, 7.3.2 and 7.3.3 (if you haven't tested them yet)? These versions were released in parallel to 7.2.6 and 7.2.7, and I have some suspicion for a change in C runtime that happened between 7.2.6 and 7.2.7, and it also happened between 7.3.1 and 7.3.3.

If 7.3.1 would fail, it would be an evidence that it's not the C runtime, will dig further.
Comment 22 Adam Clarke 2023-05-23 08:47:41 UTC
Hi Mike

I have just tried 7.3.0.1 and it works. Does this mean it is a C runtime issue then?
Comment 23 Adam Clarke 2023-05-23 08:47:53 UTC Comment hidden (obsolete)
Comment 24 Mike Kaganski 2023-05-23 09:09:16 UTC
(In reply to Adam Clarke from comment #23)

And likely, 7.3.3 will fail?
Comment 25 Adam Clarke 2023-05-23 10:07:44 UTC
Hi Mike

Have just tried 7.3.0.3 and this also works
Comment 26 Mike Kaganski 2023-05-23 10:28:25 UTC
(In reply to Adam Clarke from comment #25)
> Have just tried 7.3.0.3 and this also works

7.3.3.1 or 7.3.3.2 are interesting, I suspect that these would fail, while 7.3.2.* would still work.

This *looks* related to the change from Microsoft Visual C++ Redistributable for Visual Studio 2015-2019 version 14.28 to version 14.29, which happened between the last working and first affected versions, likely because at that time, a compiler update was applied on the builder system (so it was not a code change, but rather a compiler version change).

I can only speculate, that *if* this guess is correct, then *something* in SCCM does not allow to upgrade this *system component* - maybe this upgrade wasn't necessary using the "good" LibreOffice versions, because the managed systems already had that version, but when LibreOffice started to bundle the newer version, the system component upgrade requirement created the problem.

Can you now try to install a newer C++ Redistributable from MS (https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170, https://aka.ms/vs/17/release/vc_redist.x64.exe, current version is 14.36) on a managed system (either manually, or using SCCM - I have no idea how to do that), and then try if the problematic LibreOffice versions maybe start installing normally?
Comment 27 Mike Kaganski 2023-05-23 14:23:02 UTC
(In reply to Mike Kaganski from comment #26)
> change from Microsoft Visual C++ Redistributable
> for Visual Studio 2015-2019 version 14.28 to version 14.29

And this looks suspicious, reading the Configuration Manager Client prerequisites [1], which include a mention of "Microsoft Visual C++ 2015-2019 Redistributable version 14.28.29914.0".

*Possibly* it makes sense to open a ticket at MS at this stage; even if they find out that there's something to change in LibreOffice installer, at least they would be able to diagnose what was that. FTR, LibreOffice uses the redist MSMs (merge modules) included in MS Visual Studio.

[1] https://learn.microsoft.com/en-us/mem/configmgr/core/clients/deploy/prerequisites-for-deploying-clients-to-windows-computers#components-automatically-downloaded-during-installation
Comment 28 Adam Clarke 2023-05-23 14:55:23 UTC
Hi Mike

I am currently wrestling with trying to get the 2015-2022 redist installed in a task sequence and it just fails constantly with an error code so I will let you know where I get with this ASAP...
Comment 29 Adam Clarke 2023-05-24 09:45:51 UTC
Hi Mike

We don't have the ability to open a ticket with Microsoft with our schools agreement type so this is not an option for us im afraid. I have imported the latest VcRedist into SCCM using vcredist.com but it just fails to install in the task sequence with an unspecified error. I think I am going to have to deploy an older version this year 7.3.0.3 as I know that works which is a shame but I am in a position where I need to deploy my new image pretty urgently now so although I am keen to get a resolution the need to deploy the image is greater for me. I really appreciate all your help on this but I realise you cannot simply roll back the change either. Unfortunately it just means that deployment for the time being with Microsoft Endpoint Configuration Manager or the Microsoft Deployment Toolkit will not be possible with the latest versions.
Comment 30 Mike Kaganski 2023-05-24 10:00:57 UTC
(In reply to Adam Clarke from comment #29)

Thanks for the update.

> We don't have the ability to open a ticket with Microsoft with our schools
> agreement type so this is not an option for us im afraid.

Too bad...

> I have imported
> the latest VcRedist into SCCM using vcredist.com but it just fails to
> install in the task sequence with an unspecified error.

It looks very pathetic on the SCCM side, and suspiciously related to the issue here - note how SCCM struggles to deploy the suspected MS system component update, packaged by MS themselves... Honestly, *for now* it truly looks like a bug (or some misconfiguration) in SCCM.

> I think I am going
> to have to deploy an older version this year 7.3.0.3 as I know that works
> which is a shame but I am in a position where I need to deploy my new image
> pretty urgently now so although I am keen to get a resolution the need to
> deploy the image is greater for me. I really appreciate all your help on
> this but I realise you cannot simply roll back the change either.

You are right: the change between the versions happened because MS (again MS! :D) released an update to their Visual Studio; and many (most) of their updates include security fixes - which means, that not updating not only puts our builder in danger, but -more importantly - may put the users in danger, if they use programs compiled using unfixed compiler. We need some clear resolution here.

> Unfortunately it just means that deployment for the time being with
> Microsoft Endpoint Configuration Manager or the Microsoft Deployment Toolkit
> will not be possible with the latest versions.

Sorry for that; let me close it as NOTOURBUG - but feel free to reopen, if you happen to get a new bit of useful information.