Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted
Updated 6-Nov-12 4:13am
v2
Comments
Richard MacCutchan 6-Nov-12 5:17am    
Now I have to login and enter to the software in a single shot.

You need to explain exactly what you mean by this. Login to what or where?
bulbuli ghosh 6-Nov-12 10:10am    
Using above code ,a software is opening. Now I have to provide username and password to that software (which is predefined) and login to the system.
With the help of above code,only login screen comes, please help how to do the rest. I dont even have the API of that software
Richard MacCutchan 6-Nov-12 10:17am    
please help how to do the rest. I dont even have the API of that software.

How on earth could I know, I have no idea what this software does or how you are accessing it. Please try and explain your problems clearly, we cannot guess what is happening on your system.
Sergey Alexandrovich Kryukov 6-Nov-12 14:43pm    
Why? why? And what is the sense in asking the question about some application we have no idea about? Bad idea, overall.
--SA

1 solution

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.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 6-Nov-12 14:43pm    
Good point, a 5 -- please also see my comments to the question.
--SA
Mehdi Gholam 6-Nov-12 14:57pm    
I have become numb to the "why" people ask questions here :)
Sergey Alexandrovich Kryukov 6-Nov-12 15:08pm    
People think that shortcuts make the way shorter... :-)
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900