Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A CMD script that is not cancellable by pressing Ctrl+C
@echo off
setlocal
if "%~1" equ "NonCancelable" goto NonCancelable
start "" /B cmd /C "%~F0" NonCancelable
exit
:NonCancelable
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.