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
 
Back
Top