Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to execute my external .exe from a windows service means is it possible to call & execute .exe from windows service. if yes, then how it possible which method u use please help me with u r code.i want one example that successfully execute .exe when service is start.
Posted
Updated 5-Mar-11 1:05am
v2

Try Process.Start[^] - it allows you to execute any executable from within your program.
 
Share this answer
 
Comments
Ali Al Omairi(Abu AlHassan) 5-Mar-11 7:07am    
I voted for you. (remember me) ;)
Sandeep Mewara 5-Mar-11 7:10am    
Hmmm... nopes. You can tell me.
The answers from JSOP and Sandeep are correct, but if your application has a UI associated with it, you will need to ensure that your Windows Service has the "Interact with Desktop" feature enabled or it won't work.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 5-Mar-11 21:02pm    
Marcus, those Answers are not really correct without your important note, my 5+++.
--SA
With the Process object. Keep in mind that it must be a console application (as opposed to an app with a UI).
 
Share this answer
 
v2

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