basicx-StrgV / WGet.NET

A WinGet wrapper library for .Net. Easily install, update, uninstall and more, from your application.
https://basicx-strgv.github.io/WGet.NET/
MIT License
22 stars 8 forks source link

UpgradePackage silently #41

Open Skio22 opened 1 week ago

Skio22 commented 1 week ago

Hello, firstly, I would like to thank you for the library. I use it for upgrading packages, but every upgrade currently requires user acceptance via dialogs. Winget provides a --silent mode, which would make the package upgrading process much smoother and more seamless. Currently, the UpgradePackage function passes the --accept-source-agreements parameter. Is there a possibility to add the --silent parameter as an optional parameter?

basicx-StrgV commented 1 week ago

Hi,
I will add the silent upgrade function with the next update.

Please keep in mind that the silent installation feature of winget only works if the package that should be installed or upgraded has a silent installer option. For packages that don't offer silent installation the behavior will be the same as it is now.
But, I think, this feature should work for most packages.

Skio22 commented 1 week ago

Thank you very much for adding the silent parameter in the next update. Yes, I am aware that not every app supports silent upgrades, but it will still be a significant enhancement for my use cases.

basicx-StrgV commented 6 days ago

I released version 4.2.0, which contains a silent option for package install, upgrade, repair and uninstall.

https://github.com/basicx-StrgV/WGet.NET/releases/tag/4.2.0