cryptomator / cryptomator-win

Cryptomator .exe installer for Windows
GNU General Public License v3.0
21 stars 12 forks source link

Silent Setup ist not silent. #17

Closed joeysundotcom closed 3 years ago

joeysundotcom commented 5 years ago

Even running the setup with /verysilent /suppressmsgboxes /restartapplications produces an info box about VC++ that pauses the installation. This makes rollout impossible. Please fix.

overheadhunter commented 5 years ago

I'm not an expert with installers for Windows, so I need a little help here: How do silent installations normally work when they depend on third party stuff to be installed first?

Is there any VC++ web installer with a small footprint, that can be bundled into our installer, which can then run silently first?

joeysundotcom commented 5 years ago

The redistributables for VC++ can be found at: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads The x64 download has around 14 MB. It can be silently installed by adding /Q /norestart

Usually in InnoSetup, the switch /VERYSILENT should not produce any visible evidence of the setup running. The more practical approach would probably be to check the system registry path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall for a key that has a "DisplayName" string that contains Microsoft Visual C++ 2017 and if it isn't found, throw an error.

As a general rule of thumb, all silent installations should throw exit codes instead of messages.

overheadhunter commented 5 years ago

That is the vc redist package we're currently linking to, but if I'm not mistaken, there have been smaller packages in the past that merely were downloaders for the actual installers.

These make way more sense for use cases such as these, since 14mb adds quite a chunk to our installer. While good for compatibility, it might not be a good idea security-wise to bundle a specific vc redist version that will become outdated sooner or later.

@cryptomator/windows What are your thoughts on this? The same problem applies to the Dokany redist package.

joeysundotcom commented 5 years ago

Question of philosophy, if you ask me. Maybe a stub for visible and online installation that has the option to load and install everything needed from the net. On the other hand it should always be possible to run an installer silent and offline without any dialogues popping up. Imagine a software like SCCM or baramundi and hundreds of installations blocking client machines, because of some box being displayed. Better to throw an error code if a component is missing. Other packages and dependencies can usually be defined.

overheadhunter commented 5 years ago

Ok let's agree that we need to return an error code in case of missing dependencies for now.

This needs to be changed around here:

https://github.com/cryptomator/cryptomator-win/blob/98c2fe27e5759e1df318221434608cebc93f6758/resources/innosetup/setup.iss#L82-L99

We can discuss how to handle dependencies per se in a different issue.

infeo commented 3 years ago

Also fixed with 73dbdbc1e7135cde4a83b401cae9589d74cbfefa. Dokany does not depend on VC redistributable and all references are now removed.