如何从过程中将参数传递给CommandPrompt? [英] How to pass parameters to the CommandPrompt from the PROCESS?

查看:57
本文介绍了如何从过程中将参数传递给CommandPrompt?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要使用sqlplus(ORACLE DB)执行插入脚本.在这里,我需要提示用户输入内容为drop,create和insert(DCI)或Create,insert(CI)或仅insert(I).

因此,根据用户给出的选项,我需要使用"sqlplus.exe"执行过程.
对此有何帮助.

在此先感谢.

Hi everyone,

I have a requirement to execute the insert scripts using sqlplus(ORACLE DB). Here, I need to prompt the user to give input as drop, create and insert(DCI) or Create, insert(CI) or only insert(I).

So based on the option given by user I need to perform process using "sqlplus.exe".
Can any one help regarding this.

Thanks in advance.

推荐答案

只需在进程的启动命令中提供启动参数以及exe.

例如
Simply provide the start parameters along with the exe in the start command of the process.

e.g.
Process.Start("IExplore.exe", "www.northwindtraders.com");


是什么命令提示符,CMD.EXE应用程序?有可能,您不需要它.
您可以按照Abhinav的建议直接使用System.Diagnostics.Process开始所需的过程,以阅读更多信息:
Do you mean Command Prompt, CMD.EXE application? Chances are, you don''t need it.
You can start the process you want directly, as Abhinav just suggested, using System.Diagnostics.Process, read for more information: http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx[^].

—SA


这篇关于如何从过程中将参数传递给CommandPrompt?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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