The benefit of developing the application as a windows service

windows-services

I am going to develop an application which will process online data (comming through socket) and it does not need any user interaction.

I am thinking of a simple console application, but what about windows service does it provide extra benefit? (I know windows service does not need user logged in to run the service but I am asking about extra benefit)

Best Answer

On the top of my head:

  • You can control the user (and the rights associated with this user account) which starts the process
  • an Automatically started process means the desktop need to be on, not user logged, for the service to run
  • a policy on failure can be defined (try to restart n times run a specific program if fails)
  • a dependency can be defined (if you depend on other sevices)
  • you can wrap your scrip in an invisible windows
  • you can easily start/stop/restart the script (net start <scriptname>)