confOS/windows/update.bat

42 lines
759 B
Batchfile
Raw Permalink Normal View History

2023-04-05 12:36:58 +02:00
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
2022-12-12 00:08:32 +01:00
:: Start as administrator
2023-04-05 12:38:43 +02:00
fltmc >NUL 2>&1 || (
PowerShell Start -Verb RunAs '%0' 2>NUL || (
EXIT 1
)
EXIT 0
2022-12-12 00:08:32 +01:00
)
:: Exclusion list
SET ^"exclusions=^
Spotify.Spotify"
:: Apply exclude list
for %%i in (!exclusions!) do (
winget pin add --id %%i >NUL
)
:: Update Windows programs
2023-02-15 18:13:25 +01:00
winget upgrade -h --all
:: Clean list of exclusions
for %%i in (!exclusions!) do (
winget pin remove --id %%i >NUL
)
2023-10-01 11:01:39 +02:00
2024-07-29 15:10:41 +02:00
:: MSStore apps
:: TODO
2022-12-16 12:44:51 +01:00
:: Windows Update
2023-02-17 17:13:11 +01:00
PowerShell -Command "Set-ExecutionPolicy Bypass -Scope Process;" ^
2022-12-16 12:44:51 +01:00
"Get-WindowsUpdate -AcceptAll -Install"
2023-11-05 15:06:25 +01:00
:: Global update
2024-04-09 01:40:24 +02:00
:: TODO: see https://git.mylloon.fr/Anri/confOS/issues/11
2023-11-05 15:06:25 +01:00
:: "%ProgramFiles%\Topgrade\topgrade.exe"
2023-02-17 17:13:11 +01:00
PAUSE
2023-04-05 12:42:54 +02:00
EXIT /B