禁用通过批处理命令cmd的关闭按钮

问题描述:

即时消息还挺新的一批scripting.i有一个问题,最近有关如何禁用而批处理文件是running.i了CMD的关闭按钮,看到了有关如何克服this.but一些帖子的事情表示有出我reach..if any1能可以点我到正确的方向,这将是真正伟大的。这将是非常preferred SUM1是否能告诉我怎么做我我的批处理里面前面提到file.so当我在其他一些电脑使用它的效果依然会在那里...

im kinda new to the batch scripting.i had a problem recently about how to disable the close button of the cmd while the batch file is running.i saw some posts about how to overcome this.but the things stated there was out of my reach..if any1 could point me to a correct direction, it would be really great. it would be really preferred if sum1 can tell me how to do what i mentioned before inside my batch file.so when i use it in some other pc the effect would still be there...

感谢

您不能。

您可以通过使用一个VBScript隐藏批处理文件的执行

You could hide the execution of the batch file by using a VBScript

Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("yourbatchfile.bat"), 0, True

这会从用户隐藏它,但它不会从任务管理器杀死它阻止他们。

That would hide it from the user, but it wouldn't stop them from killing it in task manager.

你问什么不能真正完成。

What you're asking can't really be done.