我如何运行cmd完整功能 [英] How do I run cmd full function
本文介绍了我如何运行cmd完整功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
cmd.exe中的问题,当我从c打开它时#
..
当我打开start>运行> cmd
并写下这个命令..
c:\> msg \ server:192.168.6.5*发送你好
obove命令正确执行
但是当我从c#.net运行cmd时这个命令会出现这个错误
problem in cmd.exe while i open it from c#
..
when i open start > run > cmd
and write this command ..
c:\>msg \server:"192.168.6.5" * "send hello "
the obove command executed correctly
but when i run cmd from c#.net this command get this error
private void button3_Click(object sender, EventArgs e)
{
Process.Start("cmd.exe");
}
然后写相同的命令
c:\> msg \ server:192.168 .6.5*发送你好
msg不被认为是内部或外部命令...
有什么问题?
plz help
and then write the same command
c:\>msg \server:"192.168.6.5" * "send hello "
msg is not recognized as an internal or external command...
what's the problem ??
plz help
推荐答案
您必须提供msg.exe可执行文件的完整路径。
You have to provide the full path to the msg.exe executable file.
您的主要错误是使用CMD.EXE。为什么,为什么你需要它?您必须启动应用程序或运行您用于启动或运行CMD.EXE的命令,而不是CMD.EXE本身。这是可能的,但在Process.Start
和你真正需要开始之间完全没用的中间人。
-SA
Your main mistake is using CMD.EXE. Why, why would you ever need it? You have to start the application or run command which you used to start or run with CMD.EXE, not CMD.EXE itself. It's possible, but it would be totally useless middleman betweenProcess.Start
and what you really need to start.
—SA
这篇关于我如何运行cmd完整功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文