Change windows settings quickly via batch.
I will explain some of the main parts that.
create the zelez windows utility tool.
Enables the colour extension.
Lets you use "%ESC%[00m" to set colours.
Enables colours. SetLocal EnableExtensions For /F %%G In ('Echo Prompt $E ^| "%__AppDir__%cmd.exe"') Do Set "ESC=%%G"
Checks if you are running the batch with admin.
If not it will start as admin and exit the non admin instance.
Force admin to be on if not "%1"=="am_admin" ( powershell -Command "Start-Process -Verb RunAs -FilePath '%0' -ArgumentList 'am_admin'" exit /b )
Lets you print anything that has ":::" earlier in your batch file
Nice if you reuse a lot of code otherwise.
Print the zelez batch logo for /f "delims=: tokens=*" %%R in ('findstr /b ::: "%~f0"') do @echo(%%R )
Windows 11 22H3
Windows 10 22H2