sept. 25
We have seen previously how to create and deploy a windows service. What we have seen also is that we can control the start type of the service to specify whether it will be launched manually or automatically. This is very interesting, however this will be used internally by windows only at the next startup of the operating system.

It seems very logical that if we install a service and that we want it to start in an "automatic way", this service shall be running at the end of the installation process, and this without any manual action. We can do this in a very easy way via the installer (I will start again from the previous installer DLL we have created). [Plus]
sept. 24
We have seen how to create and to deploy a windows service in C#. However this post was explaining how to use to the designer functionality to deploy our service. This is not really a problem (who wants to do himself what has already been done by another one ?) but it has a "huge" drawback. This installer needs to be next to our service. And who on earth really want to find in a same place the production code (ie the service) and the deployment code (ie the installer) ? The next step would probably to add some test code, and then...

So we will see here how we can create the installer class in a separate DLL.

We will also see what to do when you get the "Error 193 0xc1" meaning "The Service service failed to start due to the following error : My Service is not a valid Win32 application." [Plus]
sept. 22
Let's say we have the following specifications :

- We want an application that will turn continuously on a machine
- This application shall require no manual interaction (starting automatically)
- This application shall monitor a specific folder on the file

The specifications are very simple and we will probably start thinking to a windows service that would be launched in an automatic manner. This service could then use a FileSystemWatcher to do its job.

We'll see in this post how we can create this service and how to start / stop the FileSystemWatcher in the OnStart and OnStop event of the service, and to parameter it, specifying the properties NotifyFilter and EnableRaisingEvents.
We'll also see how we can install the service and specify that it will start automatically on each startup of Windows.

Finally we'll give some extra links to be able to customize the behavior of the service. [Plus]