Saturday, August 19, 2017

Creating a Windows Service, in .NET

There are times you need a reliable way of running a process repeatedly, at predefined intervals.

All it takes is an 8 step process, using MS Visual Studio:
  1. Create a new service project, in MS Visual Studio
  2. Add the OnStart and OnStop procedures
  3. Modify the project to display changes in the service status
  4. Add Installers to the project
  5. Set the Startup parameters
  6. Build the new service
  7. Test the new service, by installing and starting it on the local machine
  8. Uninstall the service from the local machine

For more details on how to create a new service, see the reference link below.

Reference:
https://docs.microsoft.com/en-us/dotnet/framework/windows-services/walkthrough-creating-a-windows-service-application-in-the-component-designer