J2897 icon

Chocolatey Auto Updates

J2897 | PRO | 02/02/21 03:10:42 AM UTC | 0 ⭐ | 1894 👁️ | Never ⏰ | []
Batch |

950 B

|

None

|

0 👍

/

0 👎

@echo OFF
 
:: I added this to the Windows Task Scheduler to auto-update all of the Chocolatey
:: installed programs because the "choco-upgrade-all-at" tool didn't seem to work.
::
:: The speech program I use is Balcon if you want that too...
:: http://www.cross-plus-a.com/bconsole.htm
 
REM Do OPENFILES to check for administrative privileges.
openfiles >nul
if errorlevel 1 (
    color cf
    echo Right-click on this file and select "Run as administrator".
    pause
    color
    exit /b 1
) else echo Starting the Chocolatey upgrade process...
 
REM SAPI5 speech alert.
if exist "%BALCON_EXE%" (
    start "" /b /w "%BALCON_EXE%" -t "The Chocolatey installed programs are currently updating."
)
 
REM Run the PowerShell command.
title Chocolatey Upgrade All
powershell.exe -Command "& {choco upgrade all -y}"
 
REM SAPI5 speech alert.
if exist "%BALCON_EXE%" (
    start "" /b /w "%BALCON_EXE%" -t "The updates have finished."
)
 
REM End.
title Done!
pause
 

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎