Silent install not completely silent

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
bolshed
Posts: 4
Joined: Wed Jan 26, 2022 9:14 am

Silent install not completely silent

Post by bolshed »

I am trying to package FreeCAD for it to be deployed through SCCM for company use which requires it to be installed in silent mode.

The /S argument is supposed to install FreeCAD in silent mode but it still shows this loading indicator when starting the installer:

freeCAD.png
freeCAD.png (11.41 KiB) Viewed 3720 times
1. Is there any way to avoid this? Maybe there are more arguments which I'm not aware of?

2. Also is there any way to get MSI installer, which is preferred from packager's perspective?
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Silent install not completely silent

Post by wmayer »

uwestoehr wrote: ping
Also is there any way to get MSI installer, which is preferred from packager's perspective?
In the past we have used WIX that has created MSI installers but it's a PITA to maintain the installer scripts because each installed file must be explicitly listed. With the move to NSIS things have become much easier.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Silent install not completely silent

Post by uwestoehr »

bolshed wrote: Wed Jan 26, 2022 9:27 am I am trying to package FreeCAD for it to be deployed through SCCM for company use which requires it to be installed in silent mode.

The /S argument is supposed to install FreeCAD in silent mode but it still shows this loading indicator when starting the installer:
I tested this and this works. It only pops up for a fraction of a second what you showed as screenshot. This is just the initial cyclic redundancy check. You can ignore this.
I'll nevertheless try if here is a way to get rid of this

bolshed wrote: Wed Jan 26, 2022 9:27 am 2. Also is there any way to get MSI installer, which is preferred from packager's perspective?
Why is this preferred?
(MS is quite aggressive to only use its MSI format nowadays.)
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Silent install not completely silent

Post by uwestoehr »

uwestoehr wrote: Wed Jan 26, 2022 10:39 am
bolshed wrote: Wed Jan 26, 2022 9:27 am I am trying to package FreeCAD for it to be deployed through SCCM for company use which requires it to be installed in silent mode.

The /S argument is supposed to install FreeCAD in silent mode but it still shows this loading indicator when starting the installer:
I tested this and this works. It only pops up for a fraction of a second what you showed as screenshot. This is just the initial cyclic redundancy check. You can ignore this.
I'll nevertheless try if here is a way to get rid of this

I did so an the result is there is no way to suppress this popup than to skip the cyclic redundancy check (CRC).
I built a new installer that allow this:
https://github.com/FreeCAD/FreeCAD/rele ... ller-3.exe

Take this installer and call it with

Code: Select all

FreeCAD-0.19.3-WIN-x64-installer-3.exe /S /NCRC
to omit the CRC and thus the short popup.

For information:
- the default setting of the installer is to install for the current user. If you need to install for all users, you must add the flag

Code: Select all

/AllUsers
- To define the installation folder, you can add the flag /D. For example

Code: Select all

/D=C:\A path to FreeCAD with spaces
then the call is

Code: Select all

FreeCAD-0.19.3-WIN-x64-installer-3.exe /AllUsers /S /NCRC /D=C:\A path to FreeCAD with spaces

Can you please give feedback if this works now for you?
bolshed
Posts: 4
Joined: Wed Jan 26, 2022 9:14 am

Re: Silent install not completely silent

Post by bolshed »

Sorry for the delay. Had some busy days.

Thanks a lot! It works as supposed - no dialogs.

Concerning the question about MSI vs. EXE this is an excerpt from the training I got in the beginning:
"There is a number of scenarios that should be checked/handled when performing automation tasks of setup.exe. These scenarios describe all available approaches for packaging of executables and following them ensures successful creation of a package. The most valid and desirable approach is to extract an .msi file (if available of course) from the executable and use it for software automation, because of the functionalities that Windows Installer offers (error handling, logging, repair, rollback, simple edit options). This also usually keeps the vendor’s application logic as much as possible, because in most of the cases all of the application installation activities are embedded into the msi. The setup executable is used only as a wrapper for the msi and performs some minor tasks like displaying language dialog, checking for prerequisites, etc. This is why you, as a packager, should always start your setup.exe validation from this perspective."
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Silent install not completely silent

Post by uwestoehr »

bolshed wrote: Fri Jan 28, 2022 2:42 pm Thanks a lot! It works as supposed - no dialogs.

Many thanks for your feedback. I will then make the new installed the default for FC 0.19.3 and describe the silent options in our Wiki.

bolshed wrote: Fri Jan 28, 2022 2:42 pm The setup executable is used only as a wrapper for the msi...

I don't understand. What the installer we provide does is:
1. unzip itself to a folder you specified as installation folder
2. setting file type associations in the registry according if it should be installed for all users or not. Register FreeCAD as application, adding a start menu entry, create a desktop icon if desired etc.
3. write a script that will be executed on uninstallation. This will remove folders and changes the registry.

All 3 things can also be done manually using regedit. In fact to change the registry the installer uses the API Windows provides. So the installer .exe is just a self-extracting ZIP (that's you why can unzip it as if were a plain ZIP) + a script that changes registry entries.
The MS installer system comes never into play.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Silent install not completely silent

Post by adrianinsaval »

bolshed wrote: Fri Jan 28, 2022 2:42 pm extract an .msi file (if available of course)
Not available in FreeCAD's case I think...
The setup executable is used only as a wrapper for the msi and performs some minor tasks like displaying language dialog, checking for prerequisites, etc.
Not the case for FreeCAD AFAIK
bolshed
Posts: 4
Joined: Wed Jan 26, 2022 9:14 am

Re: Silent install not completely silent

Post by bolshed »

uwestoehr wrote: Fri Jan 28, 2022 7:04 pm Well, I'm still relatively new in this but it's more convenient for us to open the MSI in InstallShield and see/edit all the actions being performed when (un)installing and add desired changes by creating an MST.
Hmm, this is new to me that someone wants to change the uninstall actions a program provides. Every program has for good reasons certain actions it performs, so it requires a lot of detail knowledge to improve or judge them. I request you to better report what you think are mistakes that all users can benefit from them rather than fixing them only for yourself.
uwestoehr wrote: Fri Jan 28, 2022 7:04 pm What about logging? Does the EXE have a switch which creates a log file for the installation?
It has, but not when being in silent mode. When I find time, I will have a look.

Reminder for me:
* https://nsis.sourceforge.io/Reference/LogSet
* https://nsis-dev.github.io/NSIS-Forums/ ... 54368.html
uwestoehr wrote: Fri Jan 28, 2022 7:04 pm Looks like the Wiki is not updated since it's mentioning mostly the MSI installation. Would be really helpful to have a '-help' or some similar switch which lists all the switches available.
To what Wiki page do you refer?
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Silent install not completely silent

Post by uwestoehr »

bolshed wrote: Wed Feb 09, 2022 6:53 pm
uwestoehr wrote: Fri Jan 28, 2022 7:04 pm What about logging? Does the EXE have a switch which creates a log file for the installation?
It has, but not when being in silent mode. When I find time, I will have a look.
I found the time and here is a new installer for FreeCAD 0.19.3 that also logs the installation actions in silent mode:
https://github.com/FreeCAD/FreeCAD/rele ... ller-4.exe

It will write a text file named "install.log" to the installation folder of FreeCAD.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Silent install not completely silent

Post by uwestoehr »

I never noticed that we link a Wiki page for the installer at our download page. I update this Wiki page now:
https://wiki.freecadweb.org/Installing_on_Windows
Post Reply