我怎样才能燮preSS的"终止批处理作业"输入cmd.exe [英] How can I suppress the "terminate batch job" in cmd.exe

查看:136
本文介绍了我怎样才能燮preSS的"终止批处理作业"输入cmd.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找的SUP pressing的一种机制,邀请我得到每当我preSS CTRL-C在程序从批处理文件启动终止批处理作业(Y / N)?:

I'm looking for a mechanism for suppressing the "Terminate batch job? (Y/N)" invitation that I get whenever I press CTRL-C in a program started from a batch file:

批处理文件:jsshell.bat:

batch file: jsshell.bat:

@echo off
java -jar build-scripts\contrib\rhino1.7R1.jar

,然后通过启动它运行cmd shell:

and then starting it on cmd shell by:

> jsshell.bat

这使我可以通过CTRL-C可以退出一个shell其退出后让我讨厌的消息

which gives me a shell that can be exited by CTRL-C which after exiting gives me the nasty message

推荐答案

不要忘了考虑,避免批处理脚本解决该问题。

Don't forget to consider working around the problem by avoiding batch scripts.


  • Doskey宏可以代替单行批处理脚本象那个上面引述。 (装载它们在自动运行脚本

  • 的Cscript.exe 是提供各种现代化的Windows计算机上,可以运行JavaScript和VBScript程序在命令行

  • 如果您添加的文件扩展名您最喜爱的脚本语言(Perl,Python和Ruby的,等等),以您的PATHEXT环境变量和脚本添加到您的路径,你可以直接不用批处理脚本执行。

  • Doskey macros can replace one-liner batch scripts like the one quoted above. (Load them up in your Autorun script.)
  • Cscript.exe is available on every modern Windows machine and can run JavaScript and VBScript programs from the command line
  • If you add file extensions for your favorite scripting language (Perl, Python, Ruby, etc.) to your PATHEXT environment variable and add the script to your path, you can execute them directly without a batch script.

这篇关于我怎样才能燮preSS的"终止批处理作业"输入cmd.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆