Winget-AutoUpdate icon indicating copy to clipboard operation
Winget-AutoUpdate copied to clipboard

Exclude pinned winget Apps from WAU / handle major minor update exclusions with winget pin

Open FaserF opened this issue 1 year ago • 5 comments

Proposed Changes

If a blacklist is used, winget will exclude all pinned apps from winget.

Related Issues

As requested in #644

(Github link to related issues or pull requests)

FaserF avatar Oct 21 '24 15:10 FaserF

WAU is used in a corporate environment as well. I don't want my users to be able to pin apps!

Romanitho avatar Oct 22 '24 08:10 Romanitho

Okay I understand the problem you are describing. Should I drop this feature or should we add a new WAU setting for explicitly using the pinned Apps feature? (By the way, I use your tool privatly and at the company where I am working at and I have some ideas, where in the corporate scenario it would make sense to have this feature)

FaserF avatar Oct 22 '24 08:10 FaserF

If this feature is needed, we can certainly add it with an optional argument that would be off by default, for example.

Romanitho avatar Oct 22 '24 09:10 Romanitho

Test scenario:

winget pin add Mozilla.Firefox --version 98.*
Gefunden Mozilla Firefox [Mozilla.Firefox]
Pin erfolgreich hinzugefügt

C:\Users\faserf>winget pin list
Name                     ID              Version Quelle Stecknadeltyp Angeheftete Version
-----------------------------------------------------------------------------------------
Mozilla Firefox (x64 de) Mozilla.Firefox 98.0.1  winget Gating        98.*

C:\Users\faserf>winget uninstall mozilla.firefox
Gefunden Mozilla Firefox (x64 de) [Mozilla.Firefox]
Paket-Deinstallation wird gestartet...
Erfolgreich deinstalliert

C:\Users\faserf>winget install mozilla.firefox --version 98.0.1
Gefunden Mozilla Firefox [Mozilla.Firefox] Version 98.0.1
Diese Anwendung wird von ihrem Besitzer an Sie lizenziert.
Microsoft ist nicht verantwortlich und erteilt keine Lizenzen für Pakete von Drittanbietern.
Download läuft https://download-installer.cdn.mozilla.net/pub/firefox/releases/98.0.1/win64/de/Firefox%20Setup%2098.0.1.msi
  ██████████████████████████████  53.4 MB / 53.4 MB
Der Installer-Hash wurde erfolgreich überprüft
Paketinstallation wird gestartet...
Erfolgreich installiert

WAU:

#################################################################
#    23.10.2024 - CHECK FOR APP UPDATES (User context)
#################################################################
21:11:30 - Notification Level: SuccessOnly. Notification Language: Deutsch
21:11:30 - Checking internet connection...
21:11:30 - Connected !
21:11:30 - WAU uses Black List config
21:11:30 - -> Successfully loaded default excluded apps list.
21:11:32 - Excluding Mozilla.Firefox from WAU updates, as this app is pinned in winget with version 98.*
21:11:32 - Checking application updates on Winget Repository...
-> Available update : Mozilla Firefox (x64 de). Current version : 98.0.1. Available version : 98.0.2.
21:11:53 - Updating Mozilla Firefox (x64 de) from 98.0.1 to 98.0.2...
21:11:53 - ##########   WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID 'Mozilla.Firefox'   ##########
21:11:53 - -> Running: Winget upgrade --id Mozilla.Firefox -e --accept-package-agreements --accept-source-agreements -s winget -h


Gefunden Mozilla Firefox [Mozilla.Firefox] Version 98.0.2
Diese Anwendung wird von ihrem Besitzer an Sie lizenziert.
Microsoft ist nicht verantwortlich und erteilt keine Lizenzen für Pakete von Drittanbietern.
Download läuft https://download-installer.cdn.mozilla.net/pub/firefox/releases/98.0.2/win64/de/Firefox%20Setup%2098.0.2.exe


  █▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 52.9 MB
  ████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  8.00 MB / 52.9 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  12.0 MB / 52.9 MB
  ████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  21.9 MB / 52.9 MB
  ████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒  29.9 MB / 52.9 MB
  ██████████████████████▒▒▒▒▒▒▒▒  38.9 MB / 52.9 MB
  ██████████████████████████▒▒▒▒  46.9 MB / 52.9 MB
  ██████████████████████████████  52.9 MB / 52.9 MB
Der Installer-Hash wurde erfolgreich überprüft
Paketinstallation wird gestartet...

Erfolgreich installiert
21:12:36 - ##########   WINGET UPGRADE PROCESS FINISHED FOR APPLICATION ID 'Mozilla.Firefox'   ##########
21:12:36 - Mozilla Firefox (x64 de) updated to 98.0.2 !
21:12:39 - 1 apps updated ! No more update.
21:12:39 - End of process!

Other test:

winget pin list
Name                     ID              Version Quelle Stecknadeltyp Angeheftete Version
-----------------------------------------------------------------------------------------
Mozilla Firefox (x64 de) Mozilla.Firefox 98.0.2  winget Gating        98.0.2.*

WAU:

#################################################################
#    23.10.2024 - CHECK FOR APP UPDATES (User context)
#################################################################
21:14:06 - Notification Level: SuccessOnly. Notification Language: Deutsch
21:14:06 - Checking internet connection...
21:14:06 - Connected !
21:14:06 - WAU uses Black List config
21:14:06 - -> Successfully loaded default excluded apps list.
21:14:08 - Excluding Mozilla.Firefox from WAU updates, as this app is pinned in winget with version 98.0.2.*
21:14:08 - Checking application updates on Winget Repository...
21:14:09 - No update found. 'Winget upgrade' output:


Es wurde kein installiertes Paket gefunden, das den Eingabekriterien entspricht.
Mindestens 1 Paket verfügt über Versionsnummern, die nicht ermittelt werden können. Verwenden Sie „--include-unknown“, um alle Ergebnisse anzuzeigen.
1 Pakete verfügen über Pins, die ein Upgrade verhindern. Verwenden Sie den Befehl "winget pin", um Pins anzuzeigen und zu bearbeiten. Wenn Sie das --include-pinned-Argument verwenden, werden möglicherweise weitere Ergebnisse angezeigt.

21:14:09 - End of process!

GPOs have been tested to and are working with group policies, but for whatever reason it failed to load within intune

FaserF avatar Oct 23 '24 19:10 FaserF

Regarding Intune GPO #748

KnifMelti avatar Oct 24 '24 00:10 KnifMelti

@Romanitho anything missing here or anything that I would have needed to changed to get this PR mergerd? From my side it looked functional so far.

FaserF avatar Mar 14 '25 12:03 FaserF

My bad, I accidentally removed the develop branch, which closed all the PRs. 😖 That being said, I still don't see the point of pinned apps. WAU was built before this feature was introduced on Winget's side and has its own way of blocking/allowing apps. But once again, if this feature is needed, we can discuss its introduction.

Romanitho avatar Mar 14 '25 13:03 Romanitho