Windows Service calling executables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to build a Windows Service using .NET which when started, will
execute another executable such as Wordpad.exe.

How can this be done?

Any help would be appreciated.

Regards

Kevin
 
Create a new thread on service's start method and handle it a method delegate.
Use create Process class object and pass the exe name with arg if any to
Process.StartInfo method and call Process.Start().

Note that the service's start method returns within 30 sec. otherwise
service fails to start.

Zeeshan Gulzar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top