这到底是怎么做的>> ProcessInfo =新的ProcessStartInfo("cmd.exe","/C"……); [英] What this do exactly >> ProcessInfo = new ProcessStartInfo("cmd.exe", "/C "......);

查看:74
本文介绍了这到底是怎么做的>> ProcessInfo =新的ProcessStartInfo("cmd.exe","/C"……);的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这到底是怎么做的...
ProcessInfo = new ProcessStartInfo("cmd.exe","/C" ......);
据我说,它会打开命令提示符,然后...
即时通讯未授予"/C"的含义... ??
谁能告诉我如何编写一系列命令,并使用C#通过ASP.NET在命令提示符下逐个执行...

What this do exactly...
ProcessInfo = new ProcessStartInfo("cmd.exe", "/C "......);
According to me it opens command prompt & then...
im not confermed what "/C" means...??
Can any one tell me How to write a series of commands executing one by one on command prompt through ASP.NET with C# ...

推荐答案

从cmd帮助中.exe/C开关执行由字符串指定的命令,然后终止",因此,无论您在启动cmd.exe时传递给cmd.exe的命令是什么,它都会运行,然后cmd.exe将终止.
From the help for cmd.exe the /C switch "Carries out the command specified by string and then terminates", so what ever command you pass to cmd.exe when you start it, it will run, then cmd.exe will terminate.


amitthakkar1987写道:
amitthakkar1987 wrote:

谁能告诉我如何编写一系列通过ASP在命令提示符下逐个执行的命令.NET与C#...

Can any one tell me How to write a series of commands executing one by one on command prompt through ASP.NET with C# ...



当然,请记住,以这种方式在ASP.NET中执行的任何命令都将在SERVER上执行,而不是在客户端计算机上执行.



Of course, bear in mind that any commands you execute in this fashion in ASP.NET will execute on the SERVER, not on the client''s machine.


如果我想执行以下命令通过asp.net C#在cmd.exe上执行命令
> c:
> cd \
> cd程序文件"

我如何获得此thr asp.net C#??????
If I want to execute following commands on cmd.exe through asp.net C#
> c:
> cd\
> cd "Program Files"

How can i get this thr asp.net C#??????


这篇关于这到底是怎么做的>> ProcessInfo =新的ProcessStartInfo("cmd.exe","/C"……);的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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