Click here to Skip to main content
15,921,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
How to run exe program from windows service using c#.
This is mycode:

System.Diagnostics.Process.Start(@"E:\PROJECT XL\INI SQLLOADER\ConsoleApplication2\ConsoleApplication2\ConsoleApplication2\bin\Debug\ConsoleApplication2.exe");


When i run this service not happening. Please tell me whats wrong with my code. Thanks
Posted

1 solution

The service is at the system level. But your application has to run at user level. You need a tweak for that.

To start with follow discussions here.

http://stackoverflow.com/questions/267838/how-can-a-windows-service-execute-a-gui-application[^]

An additional point you may try to run your console app as admin
 
Share this answer
 
v2
Comments
Member 4716271 15-Mar-11 2:36am    
Thanks fou your answer, When i link url to Subverting Vista UAC in Both 32 and 64 bit Architectures[^]

and run this program not problem, but when i run this code into windows server 2003 problem.
Albin Abel 15-Mar-11 2:39am    
You may raise this question in the comment space of this article. He may able to give better answer

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