Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

NET5/vcredist are not being installed when upgrading from existing squirrel.windows application #22

Closed
theresia-tobii opened this issue Jan 5, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@theresia-tobii
Copy link

theresia-tobii commented Jan 5, 2022

Hi,

we have migrated our app from NET framework using the regular squirrel.windows to NET5 using clowd.squirrel. When installing from a setup file generated with clowd.squirrel the proper frameworks are installed correctly (we're using --framework net5-x86,vcredist142-x86) in this case. If these runtimes are already installed, upgrading from the old application to the new using auto-update works fine. But if they are not installed, windows will complain about them not existing and launch a website to download them instead of the installer taking care of it. I get that it may not be possible to fix this, but is there a workaround to this perhaps? I guess the same worry would apply when later upgrading to NET6 later.

Thanks

@theresia-tobii
Copy link
Author

The solution described in #9 is not a good one for us as that requires the update to not skip versions. If there is a solution to not have it skip a version, then it's fine adding code for installing. But we would really prefer this being automated.

@caesay
Copy link
Member

caesay commented Jan 5, 2022

Hi, thanks for trying Clowd.Squirrel. The workaround described in #9 is currently the best option available. You need to ship the latest version of Clowd.Squirrel and use the Runtimes API to manually install your required frameworks before installing an update that requires it.

I would like to revisit this and automate framework installs during updates, however I am not sure the best way to achieve this at the moment. It requires the user presence (as the user needs to accept the UAC prompt to install the frameworks) and I don't want to just have random UAC prompts popping up until the user is ready for it. Maybe it the "check for required framework is installed" needs to be integrated into the shortcut/stubexecutable so we can check when launching the app.

Do you have any thoughts on how this would work in an ideal world for you?

@caesay caesay added the enhancement New feature or request label Jan 5, 2022
@theresia-tobii
Copy link
Author

theresia-tobii commented Jan 5, 2022

I think I may have an idea how to solve this after all. This is what we might try to make the workaround work for us:

  • The old app fetches updates from "url1".
  • Add an update that uses net framework like before but clowd.squirrel with the workaround from Install/bootstrap new runtimes during updates #9.
  • Make this update fetch releases and updates from a new URL so that it will essentially be the last update from the old URL causing it to never be skipped in the update chain.
  • So now any new updates requiring the new framework will be fetched from the new URL and thus only be enabled from that last version that ensures the runtimes are installed.

This solves the need for preventing skipped versions that MUST run their code and makes the workaround in #9 viable for us.

@theresia-tobii
Copy link
Author

That said, it would still be nice if somehow UpdateApp could do the stuff from #9 automatically.

@caesay
Copy link
Member

caesay commented Jan 5, 2022

"somehow" is the issue :) We couldn't install runtimes during UpdateApp, because your old version of the app doesn't have Clowd.Squirrel / and will be using the logic from the UpdateApp function shipping with Squirrel.Windows. The runtime installation would need to be done after your app is installed and the new version of Squirrel is downloaded. I am going to close this issue because you have a workaround, but if anyone has ideas on how/when we could do this automatically, I'd love to hear it as additional comments on #9 and if there is ever a viable suggestion, I would love to re-open #9.

@caesay caesay closed this as completed Jan 5, 2022
@simader
Copy link

simader commented Jan 10, 2022

Hi,
We are also struggling with the need of .NET6 Desktop Runtime to be installed. Because it needs to have admin-rights to be able to install it and it is not coming with any windows update. (So nearly each users has to install it)

Has somebody an idea to extract it only the binaries, or some other workaround?

The only thing to come around that I am thinking of publish as "Self-Contained". With the disadvantage of the Installer-Size.

@caesay
Copy link
Member

caesay commented Jan 10, 2022

@simader Yes, as I've mentioned, the user needs to be present to install .net or any other runtime, and they need admin to accept the UAC dialog, so this can not be done in the background automatically.

Shipping a self contained application is possible, however it means your installer will be much bigger, and that extra size is unneeded for users who already have .net installed by another app, and you will not benefit from any security patches that may get installed.

Alternatively, if you would like to prompt your users to install .net 6 before you update to your next app version, there is an example at #9.

I have been working on a way for Squirrel to prompt your user to install a framework automatically after an update if required, however this does not remove the requirement for your users to have admin and accept a UAC dialog. I am accepting suggestions on how this feature can be improved at #9.

@clowd clowd locked and limited conversation to collaborators Jan 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants