Benefits - Background process as NT service

  • Thread starter Thread starter Mrinal Kamboj
  • Start date Start date
M

Mrinal Kamboj

Hi ,

Doubt may be bit trivial , but i wanted to know , what are the exact
benefits derived while we run a background process as an NT service in
windows , we can as well achieve the functionality using standalone exe
, which will keep on running in a loop and do the job till been messaged
to stop .

Essentially , i want the key advantages of implementing process daemons
as an NT Service in windows .

Any pointers or enumeration will be great .

TIA ,

Mrinal
 
Doubt may be bit trivial , but i wanted to know , what are the exact
benefits derived while we run a background process as an NT service in
windows , we can as well achieve the functionality using standalone exe
, which will keep on running in a loop and do the job till been messaged
to stop .

Essentially , i want the key advantages of implementing process daemons
as an NT Service in windows .

Basically, a Windows service is just like a normal Windows application
except that:

- a windows service starts as soon as Windows starts (if it is set to start
automatically) before any user logs in
- it runs constantly in the background even if there are no users logged
in. It remains running even when all the users log out
- there is always only one instance of your Windows service running even if
several interactive Windows users are logged in simultaneously
- the service control manager (SCM) lets you decide what to do if your
service crashes. You can tell the service control manager to restart the
service, restart the computer or run an executable if your service crashes
(which could for example notify you of the problem by sending an email)
- You can access the SCM remotely (provided that you have sufficient right
to do so), which allows you to monitor your service remotely
- a Windows service doesn't (well, shouldn't) have any UI
- Only administrators can start and stop a Windows Service (that's if your
service is running under the Local System account, i'm not sure of what
happens if you choose to run it under another user account)

That's all i can think of for now.
 
One of the most important reasons is that your service will be running when
your machine is turned on but nooone is logged in. A lot of companies
configure their servers to run everything as a service and leave the machine
on but with no users logged in. This is the most secure way to do it. If
you have a Windows application then a user must be logged in to the server
to run the application.

Another benefeit is that all of the Services are managed in a central
location (Services Applet). You have one place to look at to
manage/reconfigure/monitor all of your services.
 
The main advantage is the service can run in non-interactive mode and can be
configured to start as soon as the machine boots.
 
One thing is that you logout and login as a new user all processes are shut
down, exception services because services run independent from a logged in
user.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top