Created
November 6, 2019 14:01
-
-
Save thany/9e277646b90bdfa1b9006e4c5043681d to your computer and use it in GitHub Desktop.
A CMD script that is not cancellable by pressing Ctrl+C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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