Run winget upgrade at user logon and prompt user for action to run winget upgrade -all or not
- Run winget upgrade at user logon
- Display only winget found new packages to upgrade
- Ask user yes/no to run winget upgrade -all with administration privileges.
I’m not sure what the ask is here. Are you adking that this be a feature added to winget? If so, can you provide more clarity around what functionality is missing that you would like to see added?
Running a command at logon isn’t part of winget, it is handled through the Windows Task Scheduler, and you can select a command or program to run at user logon.
To display just the message “Winget found new packages to upgrade” would require checking the length of the output from winget upgrade, or possibly the text. I believe this can be done fairly easily in a batch script
As for the prompt, I could see a request to prompt if a user wishes to upgrade all packages after running winget upgrade but I’m not sure how I would feel about that being the default behavior, especially for scripted / non-interactive scenarios. Again, this seems very easy to do with a custom batch script though.
If my interpretation is accurate, and your post is simply describing something you would like to use winget to do, I think the best recommendation I can give is to create a simple batch script that -
- Runs
winget upgradeand stores the output to a variable - Checks to see if that variable matches specific text indicating upgrades were found
- Use an if statement to determine whether or not user input is required
and then set the batch script to be run on user logon
Even if this feature is to be implemented, there is https://github.com/Romanitho/Winget-AutoUpdate