confOS/windows/update.bat

20 lines
348 B
Batchfile
Raw Normal View History

2022-12-12 00:08:32 +01:00
@ECHO off
:: Start as administrator
fltmc >nul 2>&1 || (
PowerShell Start -Verb RunAs '%0' 2> nul || (
2022-12-12 00:10:20 +01:00
exit 1
2022-12-12 00:08:32 +01:00
)
exit 0
)
2022-12-16 12:44:51 +01:00
:: Windows programs
2022-12-12 00:08:32 +01:00
winget upgrade -h --all
2022-12-16 12:44:51 +01:00
:: Windows Update
powershell -Command "Set-ExecutionPolicy Bypass -Scope Process;" ^
"Get-WindowsUpdate -AcceptAll -Install"
2022-12-12 00:08:32 +01:00
pause
exit /b