When a machine reboots, do all the services which are run under the accounts (system/service/network service) get run before a user logs on?
JD.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Services have a “start type” defined per-service, those types are
boot, system, auto, demand, disabled.Services also have dependencies on each other, defined in the registry.Services with
bootandsystemstart type are started during the time period when only NT Native binaries can run (the Win32 API is not yet ready). For example, these services include such ascsrss.exewhich provides some of the Win32 API.Once Win32 has been initialized, the services with start type
automaticare started. During this time, the service which allows the user to log in runs — this displays the login prompt and does allow the user to log in.In every case, if the service being start depends on other services, then the other services will be started in advance.
So, yes, it is possible for users to log in prior to the execution of a service. However, if the login service were to depend on your service… Better, though, if you detect that your service has started. Considering using a named global event with CreateEvent() api. Your service creates the event, your application awaits the event before calling the service. Also, your app can use the ServiceControl API to start the service only when in use.
The windows “Services.msc” management plug-in hides the
bootandsystemservices. To learn more about these startup types, refer to this API documentation: MSDN: ChangeServiceConfig Function .