Skip to content

Instantly share code, notes, and snippets.

@h4kun4matata
Created June 11, 2018 20:44
Show Gist options
  • Select an option

  • Save h4kun4matata/1d614c8fbfd7728215efe5e928fecff9 to your computer and use it in GitHub Desktop.

Select an option

Save h4kun4matata/1d614c8fbfd7728215efe5e928fecff9 to your computer and use it in GitHub Desktop.
Here’s a snippet of code I wrote that will force a Windows batch script to run in a minimized window. Insert it at the beginning of the script:
if not "%minimized%"=="" goto :minimized
set minimized=true
start /min cmd /C "%~dpnx0"
goto :EOF
:minimized
rem Anything after here will run in a minimized window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment