我可以用批处理文件制作一个pc密码锁系统吗?

时间:2016-02-15 09:03:54

标签: batch-file

我通过choice命令使用逐个字符输入制作了一个字母数字密码检查器。
我是要注册它来启动程序并锁定我的电脑。

但它无法捕获 CTRL-C 终止 管道echo N解决方案对我没有帮助 因为它接收键盘输入。
如何阻止用户输入CTRL-C?

1 个答案:

答案 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来测试它,那将是最好的:)