Re: How to make sure a Service starts BEFORE a user logs on?

From: Roland Frank (roland.frank.no-spam_at_gmx.info)
Date: 05/27/05


Date: Fri, 27 May 2005 21:38:06 +0200

Hi Polaris,
just a stupid thought maybe, but how likely is it
that some user restarts your service?
So, isn't start of your service information enough
that the machine JUST rebootet?

Roland

> Thanks for the info.
>
> Within the service program, I need to "detect" the event that the machine
> has JUST rebooted. So I look for (each second) the change of logged on user
> count: right after reboot, the logged on user count should be one (which is
> the "System" account, assuming the service starts before any user has logged
> on the machine). After the user logs on the machine, the service will notice
> that the user count increased to 2 and get a "conclution" that the machine
> must have JUST been rebooted. It works fine as long as the user did not log
> on to the machine before the service starts.
>
> May be there is other way to detect a reboot event?
>
> Polaris
>
> "Ray Trent" <ratrent@nospam.nospam> wrote in message
> news:OHb4mguYFHA.2160@TK2MSFTNGP10.phx.gbl...
>
>>Services can, of course, take an arbitrary and unpredictable amount of
>>time to "start up". Off the top of my head, the only way I can think of to
>>do what you want here would be to write a GINA and synchronize its passing
>>on of credentials with completion of your service startup.
>>
>>Ugly job, and nasty if there turns out to be a bug in your code :-).
>>
>>Why does your service need to run before a user logs on? This sounds
>>suspiciously like you're asking the wrong question.
>>
>>Polaris wrote:
>>
>>>Hi:
>>>
>>>I have a regular Windows Service program (not a kernel driver) which must
>>>start BEFORE a user logs into his machine (XP or W2K). It works most of
>>>the time, but sometimes, I noticed that it started AFTER I log on the
>>>machine; especially if I logged in the machine fast right after a reboot.
>>>
>>>Is there a way in the service program, I can do something to make sure
>>>that, after reboot, the service starts before a user logs in the machine
>>>(no matter how fast the user is trying to complete his logon process)?
>>>
>>>Thanks In Advance !
>>>Polaris
>>
>>--
>>../ray\..
>
>
>



Relevant Pages

  • Disappearing desktop icons
    ... and then reboot again to bring the ... administrator privileges logs in for the first time, ... being run when a new user logs in which removes all ... references to the IE objects after the HideIE process has ...
    (microsoft.public.windows.inetexplorer.ie6.setup)
  • Re: How to make sure a Service starts BEFORE a user logs on?
    ... If you're worried about an admin restarting your service, well, ... detecting a "reboot" is ... determine this with 100% reliability), but it doesn't sound like that's ... After the user logs on the machine, ...
    (microsoft.public.windowsxp.security_admin)
  • Re: How to make sure a Service starts BEFORE a user logs on?
    ... Within the service program, I need to "detect" the event that the machine ... After the user logs on the machine, ... May be there is other way to detect a reboot event? ... > Polaris wrote: ...
    (microsoft.public.windowsxp.security_admin)
  • Re: XP Group/File Permissions (Possible BUG found)
    ... When a user logs into a system, they are issued a token which essentially ... > Then assigning Permissions to a directory so that> group "Apps" has full Access, and of course all members> of this group should also have full access. ... > What I mean is, the system will prevent any user in the> new group from accessing the directory with the new group> permissions, until a system reboot. ... > However, I am also aware that some features that seem> like a bug, are really features by design, and although> that may be reasonable in some cases, this certainly can> not be one of those. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: How to make sure a Service starts BEFORE a user logs on?
    ... Why does your service need to run before a user logs on? ... > especially if I logged in the machine fast right after a reboot. ... > Is there a way in the service program, I can do something to make sure that, ...
    (microsoft.public.windowsxp.security_admin)