Figure 1. Create a Windows Service Project.
Set the properties that define what events your service will respond to. You can also tell Windows to log all service events in the Windows Event Log by enabling the AutoLog property.