In this CoreProgramm you find how to create and Install Windows Service using Threading class. To install the Windows Service follow the below Syntax
InstallUtil.exe + Your copied path + \your service name + .exeOur path
For more details please follow the below link.
https://www.coreprogramm.com/2019/08/windows-service-Csharp.html