PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, May 19, 2022

[FIXED] What does log on/off from a windows service do?

 May 19, 2022     authentication, service-worker, web-services, windows, windows-services     No comments   

Issue

I've got three questions:

  1. What does the log on option mean in services?

  2. What happens when a user logs off?

  3. Does the service stop?

For this log on option: img1


Solution

Windows Services do not stop when a user logs off the computer. They run in the background. A service is always running, compared to an application which will get terminated when the user logs off.

More details have been discussed in this accepted answer by Microsoft contingent staff on MSDN.

"If you need an app to run while you are logged off then a service is one approach but you need to be very clear, a service is always running. You will not log in to start it. If you start a service then: a) it isn't a service, and b) it will terminate when you log off. Services generally start automatically when Windows starts. You can manually start a service through the SCM but you cannot simply go to a command line or EXE and run it, that isn't a service."

Another Microsoft Technet discussion that also clarifies the matter.

Since now you also added a photo:

The Log On Tab on the service allows you to give the service permission to log in as a specific user on the system to be able to access a protected resource that belongs only to that specific user. The user doesn't have to be logged in for the service to access the resource.

So to answer your question: Windows Services do not stop when the user logs off, however, if you want the service to be able to access protected resources (files, etc.) of a specific user even when they're not logged in, you need to provide the user credentials in the Log On tab of the service. This way, the service can "log in" to access those resources.

As for the Local System Account option, Microsoft details it in the documentation.



Answered By - GeoSn0w
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing