Shell Command C#中的必需帮助 [英] Required help in Shell Command C#

查看:93
本文介绍了Shell Command C#中的必需帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须从Windows应用程序中打开一个软件.我可以使用在按钮单击事件中编写的以下代码来打开软件:
System.Diagnostics.Process proc =新的System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName =";//exe的路径
proc.Start();


上面的代码正在正确执行.现在,我必须一次登录并输入该软件.请帮助

I have to open a software from an windows application. I can open the software using following code written in button click event:
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "";// Path of exe
proc.Start();


Above code is executing properly. Now I have to login and enter to the software in a single shot. Please Help

推荐答案

如果您的应用程序是控制台程序并且具有登录参数,则可以在proc对象中提供用户名和密码作为参数.

如果没有,那么您就无能为力了,因为您无法通过Process对象直接控制生成的应用程序.
If your application is a console program and has login parameters then you can supply the username and password as arguments in your proc object.

If not then there is nothing more you can do since you can''t directly control the spawned application via the Process object.


这篇关于Shell Command C#中的必需帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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