Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

FaserF
Copy link
Contributor

@FaserF FaserF commented Oct 21, 2024

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)

@Romanitho
Copy link
Owner

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

@FaserF
Copy link
Contributor Author

FaserF commented Oct 22, 2024

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)

@Romanitho
Copy link
Owner

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

@FaserF FaserF marked this pull request as ready for review October 23, 2024 17:04
@FaserF
Copy link
Contributor Author

FaserF commented Oct 23, 2024

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 FaserF changed the title Exclude pinned winget Apps from WAU Exclude pinned winget Apps from WAU / handle major minor update exclusions with winget pin Oct 23, 2024
@KnifMelti
Copy link
Contributor

Regarding Intune GPO #748

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants