confOS/windows/update.bat

25 lines
498 B
Batchfile

@ECHO OFF
:: Start as administrator
fltmc >NUL 2>&1 || (
PowerShell Start -Verb RunAs '%0' 2>NUL || (
EXIT 1
)
EXIT 0
)
:: Windows programs
winget upgrade -h --all
:: NOTE: If you want to not update a package, you can pin it:
:: winget pin add --id ID.OF.THE.APP
:: Windows Update
PowerShell -Command "Set-ExecutionPolicy Bypass -Scope Process;" ^
"Get-WindowsUpdate -AcceptAll -Install"
:: Global update
:: "%ProgramFiles%\Topgrade\topgrade.exe"
PAUSE
EXIT /B