Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does a Windows service differ from a standard exe?

What's the difference between a Windows service and a standard exe?

like image 451
LearningCSharp Avatar asked Jan 24 '10 04:01

LearningCSharp


People also ask

What is a difference between a service and a typical Windows application?

Unlike regular software that is launched by the end user and only runs when the user is logged on, Windows Services can start without user intervention and may continue to run long after the user has logged off. The services run in the background and will usually kick in when the machine is booted.

What is a Windows service executable?

A Windows Service is an executable application that the operating system runs in the background. It does not require a logged-in user session to run. In Windows, the Service Control Manager (SCM) manages all Windows service processes. The SCM is a special system process that starts and stops the services.

When should you use Windows services?

You should create a Windows Service to run code in the background, without user interaction. For example, a Windows Service will run even if no-one is logged on. Any server that accepts connections (such as a mail, web, or FTP server) should usually be a Windows Service.


1 Answers

A windows service always runs once the computer starts up (as long as it's so configured). A standard EXE only runs when a user is logged in, and will stop if the user logs out.

You would use a windows service for things that always need to run even if nobody is logged in.

You would use a standard EXE for programs that a user will run while logged in.

like image 177
Eric J. Avatar answered Oct 10 '22 20:10

Eric J.