Ajit_Kr
asked on
How to call console/window/desktop application from a window service...?
How to call console/window/desktop application from a window service...
so that console or form should appear on screen for user interaction....
right now it is running in background.. i.e. not appearing on screen for user interaction..
please help..!
so that console or form should appear on screen for user interaction....
right now it is running in background.. i.e. not appearing on screen for user interaction..
please help..!
what is your current code?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Process myProcess = new Process();
myProcess.StartInfo.UseShe llExecute = false;
myProcess.StartInfo.FileNa me = exepath;
myProcess = System.Diagnostics.Process .Start(myP rocess.Sta rtInfo.Fil eName, System.Environment.UserNam e);
myProcess.WaitForExit(200) ;
Console.ReadLine();
myProcess.StartInfo.UseShe
myProcess.StartInfo.FileNa
myProcess = System.Diagnostics.Process
myProcess.WaitForExit(200)
Console.ReadLine();
ASKER
here is complete code I am using...
Service1.cs
Service1.cs
ASKER
mainly I have to execute a console application in which there will be some question - answer session with the user.. i.e. console application need user interaction..
ASKER
problem is described in more detail in this URL
http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/9ed01477-dd8e-4467-aa8c-42fb8de8a912/
http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/9ed01477-dd8e-4467-aa8c-42fb8de8a912/
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it is done but still it is not showing..
What is the OS? What is the session the service is running in ?
For post-Vista OS your service is running in session 0 and then, since the application cannot run in session 0, are we sure that there is no issue here ?
For post-Vista OS your service is running in session 0 and then, since the application cannot run in session 0, are we sure that there is no issue here ?
ASKER
OS is xp & win 2003
console application now started executing but only sometimes... means 1 outof 5 time console app execute..
what is this issue..?
console application now started executing but only sometimes... means 1 outof 5 time console app execute..
what is this issue..?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No I am not closing the question... I have accepted the multiple solution..