If you want to be able to run the program with no user logged on, then a windows service is the way to go. If you want some graphical user interface, a normal application is more useful.
As a side node, you can change an application with debug-flags between starting as a service and starting as an application. Add a Service-Class to your app and another class for your custom code. The service will also call the Sample class. Then you can switch between using each during debug if you add a precompiler #if DEBUG in the Program.cs
public static void Main()
{
#if DEBUG
SampleClass sc = new SampleClass();
sc.Start();
#else
ServiceBase[] servicesToRun = new ServiceBase[]
{
new SampleService ()
};
ServiceBase.Run(servicesToRun);
#endif
}
then you can also add code for output that works differently for each build-type
public static void WriteLog(string message, LogLevel logLevel)
{
#if DEBUG
Console.WriteLine(message);
#else
Trace.Write ($"{DateTime.Now:dd.MM.yyyy HH:mm:ss.fff} {message}");
#endif
}
Then if you start the app choose between build and debug. But you can only install the release-build as service this way.