Daily Silent Update of All Your Winget Apps

Winget Update Command

Updating all of your Winget and Microsoft Store software is a pretty basic command, just:

winget update --all

However, if you have a lot of software packages, this gets annoying fast, because it will prompt you with a UAC admin prompt prior to updating EACH package. I have one desktop with 39 packages installed. This is a pain. To get Winget to update all of the packages silently WITHOUT UAC prompts, there are 2 steps:

Make sure you’re running CMD (or Terminal or PowerShell) as Admin.

Run this command:
winget update --all --silent


Now that you have the command for these updates down, the next step is to automate it. Patching software is important, and it’s very easy to get behind. To automate this, I go old school and create a batch file and run it as a scheduled task.

Batch File

To create the batch file, open Notepad and enter the following text:

winget update --all --silent

Next, save as wingetupdate.bat.

NOTE: Make sure you save the file as wingetupdate.bat and not wingetupdate.bat.txt. To verify, find the file in File Explorer, make sure View —> File name extensions is checked. It should look like below:


Once the batch file is ready, you can test it by right-clicking on it and selecting Run As Administrator. If all is good, it will launch the CLI, pop up with a single UAC prompt for approval, and then run the update command.

Scheduling Updates

Now that the batch file is tested and ready, open the Task Scheduler app. This is a pre-installed Windows app, so it should already be on your device. Click on Task Scheduler Library and then select Create Task…


On the Create Task screen, on the General tab give the task a descriptive name, then select “Run with the highest privileges” option, which is critical if you don’t want to have multiple UAC prompts. For my scenarios, I also leave this set to “Run only when user is logged on” as it doesn’t play well with the running whether user is logged on or not option.


On the Trigger tab, click new, select a frequency and time, and make sure the “Enabled” box is checked.


On the Actions tab, click New, then select “Start a program” and browse for the batch file we previously saved and click OK.


On the Settings tab the defaults should be acceptable, but can be tweaked based on your needs. To be able to test it, make sure “Allow task to be run on demand” is checked. Click OK when you’re done. Mine is set like this:


Now, in Task Scheduler, click on the newly created task to select it, then click Run.


When this runs, a CLI window should pop up and run with no need for intervention. It should disappear when it finishes running.


Under the Last Run Result column in Task Scheduler, you should now see “The operation completed successfully” like below:


Beoordeel deze vraag:

0 (0 Stemmen)