Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
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 5-Nov-12 22:57pm
Edited 6-Nov-12 4:13am
v2
Comments
Richard MacCutchan at 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 at 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 at 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 at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 6-Nov-12 14:43pm
   
Good point, a 5 -- please also see my comments to the question.
--SA
Mehdi Gholam at 6-Nov-12 14:57pm
   
I have become numb to the "why" people ask questions here :)
Sergey Alexandrovich Kryukov at 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)



Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid