28 January 2026

Schedule Choco Upgrade

If you are using Chocolatey, you probably want to keep installed software up to date. You can automate it with Task Scheduler (runs as SYSTEM, highest privileges). Run these commands from an elevated Command Prompt / PowerShell.

Always-on machines (weekly schedule):

schtasks /Create /F /RU SYSTEM /RL HIGHEST /SC WEEKLY /D SUN /ST 03:00 /TN "Choco Upgrade" /TR "cmd /c echo ==== %DATE% %TIME% ====>> C:\ProgramData\ChocoUpgrade.log & choco upgrade all -y >> C:\ProgramData\ChocoUpgrade.log 2>&1"

This works best on machines that are typically powered on at the scheduled time.

Laptops (run on startup, with a 5min delay):

schtasks /Create /F /RU SYSTEM /RL HIGHEST /SC ONSTART /DELAY 0005:00 /TN "Choco Upgrade" /TR "cmd /c echo ==== %DATE% %TIME% ====>> C:\ProgramData\ChocoUpgrade.log & choco upgrade all -y >> C:\ProgramData\ChocoUpgrade.log 2>&1"

Note: this runs on every startup (Chocolatey will usually finish quickly if there is nothing to upgrade).