我通过choice
命令使用逐个字符输入制作了一个字母数字密码检查器。
我是要注册它来启动程序并锁定我的电脑。
但它无法捕获 CTRL-C 终止
管道echo N
解决方案对我没有帮助
因为它接收键盘输入。
如何阻止用户输入CTRL-C?
答案 0 :(得分:0)
找到此网站:Dos Tips
The solution that I found to block CTRL+C aka Terminate Batch Y/N COMPLETELY.
No Fuss, No kidding, No Breaking Out. XOUT but that too can be disabled.
Briefly:
Code:
C:\PROFILES\ADMIN>REN "%COMSPEC:~0,-8%\CSRSS.EXE" !!!CSRSS.!!!
OOPS Windows File Protection. If WFP is enabled ask almighty Google about that.
Transpose the file names to undo. WARNING: This MAY also break your toaster. 8)
PRO: Disallow all programs from injecting code via CSRSS hooking.
CON: PROPERTIES from the System Menu of CMD Windows are disabled as well.
CON: Enemy Territory will certainly whine until dialog box is dismissed once.
ELSE This is bulletproof. I'm being extremely terse!
我建议您在运行脚本之前阅读其他页面及其中的一些信息,因为它可能会造成损害。如果你有一个VM来测试它,那将是最好的:)