cmd/C 是什么意思? [英] What does cmd /C mean?

查看:29
本文介绍了cmd/C 是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能理解 cmd 但不能理解 cmd/c.我试图从我使用的当前调用 java 程序 Runtime.getRuntime().exec("cmd/C java helloworld"); 出现了我的疑问.

解决方案

您应该感兴趣的部分是 /? 部分,它应该可以解决您使用该工具遇到的大多数其他问题.

<前>Microsoft Windows XP [版本 5.1.2600](C) 版权所有 1985-2001 Microsoft Corp.C:>cmd/?启动 Windows XP 命令解释器的新实例CMD [/A |/U] [/Q] [/D] [/E:ON |/E:OFF] [/F:ON |/F:OFF] [/V:ON |/V:关][[/S] [/C |/K] 字符串]/C 执行字符串指定的命令,然后终止/K 执行字符串指定的命令但保持不变/S 修改/C 或/K 之后的字符串处理(见下文)/Q 关闭回声/D 禁止从注册表执行 AutoRun 命令(见下文)/A 使管道或文件的内部命令输出为 ANSI/U 导致将内部命令输出到管道或文件统一码/T:fg 设置前景色/背景色(有关详细信息,请参阅 COLOR/?)/E:ON 启用命令扩展(见下文)/E:OFF 禁用命令扩展(见下文)/F:ON 启用文件和目录名称完成字符(见下文)/F:OFF 禁用文件和目录名称完成字符(见下文)/V:ON 使用 !作为分隔符.例如,/V:ON 将允许 !var!扩大执行时变量 var.var 语法扩展变量在输入时,这在 FOR 内部是完全不同的环形./V:OFF 禁用延迟的环境扩展.

I can understand cmd but not cmd /c. I was trying to invoke a java program from the current for which I use Runtime.getRuntime().exec("cmd /C java helloworld"); There arises my doubt.

解决方案

The part you should be interested in is the /? part, which should solve most other questions you have with the tool.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:>cmd /?
Starts a new instance of the Windows XP command interpreter

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
    [[/S] [/C | /K] string]

/C      Carries out the command specified by string and then terminates
/K      Carries out the command specified by string but remains
/S      Modifies the treatment of string after /C or /K (see below)
/Q      Turns echo off
/D      Disable execution of AutoRun commands from registry (see below)
/A      Causes the output of internal commands to a pipe or file to be ANSI
/U      Causes the output of internal commands to a pipe or file to be
        Unicode
/T:fg   Sets the foreground/background colors (see COLOR /? for more info)
/E:ON   Enable command extensions (see below)
/E:OFF  Disable command extensions (see below)
/F:ON   Enable file and directory name completion characters (see below)
/F:OFF  Disable file and directory name completion characters (see below)
/V:ON   Enable delayed environment variable expansion using ! as the
        delimiter. For example, /V:ON would allow !var! to expand the
        variable var at execution time.  The var syntax expands variables
        at input time, which is quite a different thing when inside of a FOR
        loop.
/V:OFF  Disable delayed environment expansion.

这篇关于cmd/C 是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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