Home

Change windows settings quickly via batch.

I will explain some of the main parts that.
create the zelez windows utility tool.

Current options

  1. Windows 11 context menu editor
    Changes the default Windows 11 style richt click menu (On lower Windows does nothing).
  2. Windows Shit
    Secret Settings, Boot to bios and create a restore point.
  3. Power options
    Create Ultimate Performance powerplan, Change, Delete or List powerplan(s).
  4. Windows firewall
    Reset, turn off/on the windows firewall or show current state of all firewall profiles.
  5. PowerShell execution policies
    Change and view the current PowerShell execution policies.

Menu and home

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
  )

Tested on:

Windows 11 22H3
Windows 10 22H2