Only update specific apps
KnifMelti opened this issue · 22 comments
As an alternative to the 'excluded_apps.txt' it would be nice to have a 'included_apps.txt' for whitelisting purpose, i.e when specifik apps are installed via SCCM that list could be updated and WAU should only update these, not anything else.
Hi.
Thanks for your comment. It was in my mind, so thanks to have written it down.
Just thinking about the best way to have white and black list options in install script.
My take on this is:
If there exist a white list (populated or unpopulated) then nothing gets updated until the white list gets populated.
I'm saving all our apps that we let the users manage as Available in SCCM in registry as Detection Method under HKEY_LOCAL_MACHINE\SOFTWARE\Winget
InstEd.InstEd=Installed
TimKosse.FileZilla.Client=Uninstalled
etc.
If/when there's a whitelist for WAU I'm gonna populate the list from the registry when users install/uninstall an app from SCCM
v1.7.0 published as pre-release for testing.
You can now use white list to only maintain app you want.
Juste create an included_apps.txt next to excluded_apps.txt, add the apps in list and run ".\Winget-AutoUpdate-Install.ps1 -UseWhiteList"
Nice solution (populated or not)!
#White List or Black List apps if ($UseWhiteList){ if (Test-Path "$PSScriptRoot\included_apps.txt"){ Copy-Item -Path "$PSScriptRoot\included_apps.txt" -Destination $WingetUpdatePath -Recurse -Force -ErrorAction SilentlyContinue } else{ New-Item -Path $WingetUpdatePath -Name "included_apps.txt" -ItemType "file" -ErrorAction SilentlyContinue } } else { Copy-Item -Path "$PSScriptRoot\excluded_apps.txt" -Destination $WingetUpdatePath -Recurse -Force -ErrorAction SilentlyContinue }
The idea if you use White List is :
if a file exists, keep it
if no file, create empty one
And if you use Winget-Install, you can install apps and use the "-WAUWhiteList" switch to add the app to white list when it's installed
Wonderful!
Used your WAU (stripped version) for install/repair (update)/uninstall single apps in SCCM before (because of the non existing whitelist feature in WAU.
In that way users could manually update single apps from Software Center.
Going to abandon my own additions and begin using your Winget-Install + WAU and $WAUWhiteList instead!
Thanks!
glad it helped ;)
Hi!
Don't include ‐Listpath in your install. It will find the list itself (default).
But, you must use the -UseWhiteList parameter!
Ok so for those that were deployed with the ‐Listpath is there a way to fix them after the fact?
Yes, simply redeploy WAU.
Could you in a terminal manually run the command winget upgrade --source winget
and post the output, please!
Strange then...
...there's the string of dashes (when there's not the message of An unusual... pops up).
Are those apps in your white list?
No this is my whitelist.
Google.Chrome
AgileBits.1Password
Perimeter81Ltd.Perimeter81Ltd
SlackTechnologies.Slack
Zoom.Zoom
Well, run the same command as before as system in a terminal (psexec or nirsoft advanced run) and post the output.
https://www.nirsoft.net/utils/advanced_run.html
But then you must give the path to your system winget too.
I'm not on keyboard at my pc.
Your system winget is under C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.20.1881.0_x64__8wekyb3d8bbwe
I agree, in your case we need to see what winget returns in system context.