Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A CMD script that suppresses the "Terminate batch job" question upon pressing Ctrl+C, and ends the script immediately instead
@echo off
if "%~1"=="-FIXED_CTRL_C" (
shift
) else (
call <nul %0 -FIXED_CTRL_C %*
goto :EOF
)
rem DO STUFF HERE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.