confOS/windows/update.bat
2022-12-16 12:44:51 +01:00

20 lines
403 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
:: Windows Update
powershell -Command "Set-ExecutionPolicy Bypass -Scope Process;" ^
"Import-Module PSWindowsUpdate;" ^
"Get-WindowsUpdate -AcceptAll -Install"
pause
exit /b