I need to know when the Winlogon screen is displayed. I want this as
it is at this point that my app is going to know that all services are
up and running. Winlogon Notification will only send an event after a
user logs in and I need to know that we are ready to accept a user to
log in. If a user is not going to login to this machine by using the
Winlogon Notification I will never know that we are in a run state
according to my app. The event before this is Startup and this is too
early in the boot process for me to say we are ready to go.

Do any of you know how I can tell that the logon screen is there? Is
there a service that I can check that will start right about the time
of the logon screen? I know that if the machine is set to auto logon
a user then I will not get a logon screen but I can then use the
Winlogon StartShell to know that we are ready to go.

Thanks
Bob

Re: Winlog screen displayed by Ray

Ray
Thu Mar 17 12:48:16 CST 2005

You can do it by writing a GINA, but this requirement seems somewhat
scattered.

E.g. Just because the WinLogon screen is up doesn't mean that all
services are started. In fact, some are started only after the user logs
in (those needed by apps that demand start them, including many several
by Explorer, IIRC). If you need a particular service started, do that
directly with a dependency.

Bob Bader wrote:
> I need to know when the Winlogon screen is displayed. I want this as
> it is at this point that my app is going to know that all services are
> up and running. Winlogon Notification will only send an event after a
> user logs in and I need to know that we are ready to accept a user to
> log in. If a user is not going to login to this machine by using the
> Winlogon Notification I will never know that we are in a run state
> according to my app. The event before this is Startup and this is too
> early in the boot process for me to say we are ready to go.
>
> Do any of you know how I can tell that the logon screen is there? Is
> there a service that I can check that will start right about the time
> of the logon screen? I know that if the machine is set to auto logon
> a user then I will not get a logon screen but I can then use the
> Winlogon StartShell to know that we are ready to go.
>
> Thanks
> Bob
>

--
../ray\..

Re: Winlog screen displayed by bbader

bbader
Thu Mar 17 13:35:43 CST 2005

Ray

Yes, I understand that not all services are up by the logon screen but
for our application everything we expect to be running is supposed to
be by then. We then consider the unit to be "running" and can perform
the checks that are needed. We are only concerned with the automatic
services and not the application services at this point. Once a user
logs in then we would be looking for other items that would be
expected.

On the GINA, I am hoping to find a different way to do this. I am
looking into the possibility of determining when the GINA DLL gets
loaded into memory and then consider that as the running state. It
appears that the GINA gets loaded and unloaded when needed so if I can
figure out how to determine if it is currently loaded then I should be
all set for what I want.

It would have been nice if MS had provided another event in the
Winlogon Notifications that handled this case of ready for logon.

Thanks
Bob


On Thu, 17 Mar 2005 10:48:16 -0800, Ray Trent <ratrent@nospam.nospam>
wrote:

>You can do it by writing a GINA, but this requirement seems somewhat
>scattered.
>
>E.g. Just because the WinLogon screen is up doesn't mean that all
>services are started. In fact, some are started only after the user logs
>in (those needed by apps that demand start them, including many several
>by Explorer, IIRC). If you need a particular service started, do that
>directly with a dependency.
>
>Bob Bader wrote:
>> I need to know when the Winlogon screen is displayed. I want this as
>> it is at this point that my app is going to know that all services are
>> up and running. Winlogon Notification will only send an event after a
>> user logs in and I need to know that we are ready to accept a user to
>> log in. If a user is not going to login to this machine by using the
>> Winlogon Notification I will never know that we are in a run state
>> according to my app. The event before this is Startup and this is too
>> early in the boot process for me to say we are ready to go.
>>
>> Do any of you know how I can tell that the logon screen is there? Is
>> there a service that I can check that will start right about the time
>> of the logon screen? I know that if the machine is set to auto logon
>> a user then I will not get a logon screen but I can then use the
>> Winlogon StartShell to know that we are ready to go.
>>
>> Thanks
>> Bob
>>
>
>--
>../ray\..


Re: Winlog screen displayed by Ray

Ray
Thu Mar 17 15:55:54 CST 2005

Ok, but again, if all you care about is knowing that some set of
services are already loaded, why not just have your service depend on
the ones you need?

Bob Bader wrote:
> Ray
>
> Yes, I understand that not all services are up by the logon screen but
> for our application everything we expect to be running is supposed to
> be by then. We then consider the unit to be "running" and can perform
> the checks that are needed. We are only concerned with the automatic
> services and not the application services at this point. Once a user
> logs in then we would be looking for other items that would be
> expected.
>
> On the GINA, I am hoping to find a different way to do this. I am
> looking into the possibility of determining when the GINA DLL gets
> loaded into memory and then consider that as the running state. It
> appears that the GINA gets loaded and unloaded when needed so if I can
> figure out how to determine if it is currently loaded then I should be
> all set for what I want.
>
> It would have been nice if MS had provided another event in the
> Winlogon Notifications that handled this case of ready for logon.
>
> Thanks
> Bob
>
>
> On Thu, 17 Mar 2005 10:48:16 -0800, Ray Trent <ratrent@nospam.nospam>
> wrote:
>
>
>>You can do it by writing a GINA, but this requirement seems somewhat
>>scattered.
>>
>>E.g. Just because the WinLogon screen is up doesn't mean that all
>>services are started. In fact, some are started only after the user logs
>>in (those needed by apps that demand start them, including many several
>>by Explorer, IIRC). If you need a particular service started, do that
>>directly with a dependency.
>>
>>Bob Bader wrote:
>>
>>>I need to know when the Winlogon screen is displayed. I want this as
>>>it is at this point that my app is going to know that all services are
>>>up and running. Winlogon Notification will only send an event after a
>>>user logs in and I need to know that we are ready to accept a user to
>>>log in. If a user is not going to login to this machine by using the
>>>Winlogon Notification I will never know that we are in a run state
>>>according to my app. The event before this is Startup and this is too
>>>early in the boot process for me to say we are ready to go.
>>>
>>>Do any of you know how I can tell that the logon screen is there? Is
>>>there a service that I can check that will start right about the time
>>>of the logon screen? I know that if the machine is set to auto logon
>>>a user then I will not get a logon screen but I can then use the
>>>Winlogon StartShell to know that we are ready to go.
>>>
>>>Thanks
>>>Bob
>>>
>>
>>--
>>../ray\..
>
>

--
../ray\..

Re: Winlog screen displayed by Maxim

Maxim
Thu Mar 17 23:52:16 CST 2005

> I need to know when the Winlogon screen is displayed. I want this as
> it is at this point that my app is going to know that all services are
> up and running.

Winlogon screen is displayed long before all services are up and running.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: Winlog screen displayed by Maxim

Maxim
Thu Mar 17 23:53:05 CST 2005

> Yes, I understand that not all services are up by the logon screen but
> for our application everything we expect to be running is supposed to
> be by then. We then consider the unit to be "running"

Bad idea.

Write your app as a service and put explicit registry dependencies on this
service.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: Winlog screen displayed by bbader

bbader
Fri Mar 18 06:35:08 CST 2005

Thanks to everyone who has responded already.

Let me try to explain a little further. We are trying to pick a point
in time during the boot process so that we can be relatively sure that
all services that are going to run before a user logs in are running.
With what we are trying to do we can't have our app depend on
something else because we do not know what that something else is. We
have no knowledge of what items are installed on the machine that we
are interested in and that is why we are trying to pick a time of
where we can try to be sure that they are running. We need this
because if no user logs in then we will not have any idea what state
the machine is in.

Now getting back to the logon screen. My impression is that once the
logon screen is displayed all services that are not part of a users
environment are already running. For instance there is Acme Corp.
that is providing anti virus protection. They would have an automatic
service that runs on the system and a application part that the user
can also use. The service part is run during boot and should be
running by the time the logon screen is displayed. Our app doesn't
know that Acme has been installed but we want to be relatively sure
that the service is running.

If we knew that someone would log into the machine then we would not
have a problem but in the case of a server a user will most likely not
be logged in, This is why we need to know at what point we are in the
boot process and is why we chose the logon screen. Unfortunetly
winlogon is run early in the process but I believe that it doesn't
display the GINA until later in the boot process after other services
are running. So now I am looking at the possibility of picking
another service that looks like it loads late in the process but
before the user logs in.

Thanks again,
Bob

On Fri, 18 Mar 2005 08:52:16 +0300, "Maxim S. Shatskih"
<maxim@storagecraft.com> wrote:

>> I need to know when the Winlogon screen is displayed. I want this as
>> it is at this point that my app is going to know that all services are
>> up and running.
>
>Winlogon screen is displayed long before all services are up and running.
>
>--
>Maxim Shatskih, Windows DDK MVP
>StorageCraft Corporation
>maxim@storagecraft.com
>http://www.storagecraft.com
>
>


Re: Winlog screen displayed by Ray

Ray
Fri Mar 18 11:10:28 CST 2005

Interesting requirement, but the fundamental question remains: why? What
is it about "most" "non-user-environment" services "already being
started" that makes a difference to your service? I use quotes, because
all of those are rather ambiguous requirements.

Also, please note that this fails the "what if everyone did it?" test...
There could be numerous services out there that employ a similar tactic
to the one you are proposing, and there's no way to guarantee that
you'll load after them (kind of by definition).

Bob Bader wrote:
> Thanks to everyone who has responded already.
>
> Let me try to explain a little further. We are trying to pick a point
> in time during the boot process so that we can be relatively sure that
> all services that are going to run before a user logs in are running.
> With what we are trying to do we can't have our app depend on
> something else because we do not know what that something else is. We
> have no knowledge of what items are installed on the machine that we
> are interested in and that is why we are trying to pick a time of
> where we can try to be sure that they are running. We need this
> because if no user logs in then we will not have any idea what state
> the machine is in.
>
> Now getting back to the logon screen. My impression is that once the
> logon screen is displayed all services that are not part of a users
> environment are already running. For instance there is Acme Corp.
> that is providing anti virus protection. They would have an automatic
> service that runs on the system and a application part that the user
> can also use. The service part is run during boot and should be
> running by the time the logon screen is displayed. Our app doesn't
> know that Acme has been installed but we want to be relatively sure
> that the service is running.
>
> If we knew that someone would log into the machine then we would not
> have a problem but in the case of a server a user will most likely not
> be logged in, This is why we need to know at what point we are in the
> boot process and is why we chose the logon screen. Unfortunetly
> winlogon is run early in the process but I believe that it doesn't
> display the GINA until later in the boot process after other services
> are running. So now I am looking at the possibility of picking
> another service that looks like it loads late in the process but
> before the user logs in.
>
> Thanks again,
> Bob
>
> On Fri, 18 Mar 2005 08:52:16 +0300, "Maxim S. Shatskih"
> <maxim@storagecraft.com> wrote:
>
>
>>>I need to know when the Winlogon screen is displayed. I want this as
>>>it is at this point that my app is going to know that all services are
>>>up and running.
>>
>>Winlogon screen is displayed long before all services are up and running.
>>
>>--
>>Maxim Shatskih, Windows DDK MVP
>>StorageCraft Corporation
>>maxim@storagecraft.com
>>http://www.storagecraft.com
>>
>>
>
>

--
../ray\..

Re: Winlog screen displayed by kai

kai
Fri Mar 18 17:18:08 CST 2005

> Let me try to explain a little further. We are trying to pick a point
> in time during the boot process so that we can be relatively sure that
> all services that are going to run before a user logs in are running.


what about writing a driver that installs a process create callback. you
could watch those callbacks to find the 'last' one



Re: Winlog screen displayed by bbader

bbader
Wed Mar 23 07:05:17 CST 2005

Well if we expect a service to be running and it is not then we would
determine that something is either wrong with the machine or it has
been compromised. We need a point in time to say that we expect all
the services that we are concerned with to be running and if there is
no response from them then something is worng.

Now I have come up with a solution to this problem. In my research I
have found that the RemoteValidation group is started towards the end
of the boot up process. It looks like on most systems the only
service in this group is netlogon. What I am going to do is create a
service and place it in this group. All this service will do is write
a value to a registry key. My main service will be watching this
registry key and when it has been set for the end of boot I will know
that all services that I expect to be running are running.


On Fri, 18 Mar 2005 09:10:28 -0800, Ray Trent <ratrent@nospam.nospam>
wrote:

>Interesting requirement, but the fundamental question remains: why? What
>is it about "most" "non-user-environment" services "already being
>started" that makes a difference to your service? I use quotes, because
>all of those are rather ambiguous requirements.
>
>Also, please note that this fails the "what if everyone did it?" test...
>There could be numerous services out there that employ a similar tactic
>to the one you are proposing, and there's no way to guarantee that
>you'll load after them (kind of by definition).
>
>Bob Bader wrote:
>> Thanks to everyone who has responded already.
>>
>> Let me try to explain a little further. We are trying to pick a point
>> in time during the boot process so that we can be relatively sure that
>> all services that are going to run before a user logs in are running.
>> With what we are trying to do we can't have our app depend on
>> something else because we do not know what that something else is. We
>> have no knowledge of what items are installed on the machine that we
>> are interested in and that is why we are trying to pick a time of
>> where we can try to be sure that they are running. We need this
>> because if no user logs in then we will not have any idea what state
>> the machine is in.
>>
>> Now getting back to the logon screen. My impression is that once the
>> logon screen is displayed all services that are not part of a users
>> environment are already running. For instance there is Acme Corp.
>> that is providing anti virus protection. They would have an automatic
>> service that runs on the system and a application part that the user
>> can also use. The service part is run during boot and should be
>> running by the time the logon screen is displayed. Our app doesn't
>> know that Acme has been installed but we want to be relatively sure
>> that the service is running.
>>
>> If we knew that someone would log into the machine then we would not
>> have a problem but in the case of a server a user will most likely not
>> be logged in, This is why we need to know at what point we are in the
>> boot process and is why we chose the logon screen. Unfortunetly
>> winlogon is run early in the process but I believe that it doesn't
>> display the GINA until later in the boot process after other services
>> are running. So now I am looking at the possibility of picking
>> another service that looks like it loads late in the process but
>> before the user logs in.
>>
>> Thanks again,
>> Bob
>>
>> On Fri, 18 Mar 2005 08:52:16 +0300, "Maxim S. Shatskih"
>> <maxim@storagecraft.com> wrote:
>>
>>
>>>>I need to know when the Winlogon screen is displayed. I want this as
>>>>it is at this point that my app is going to know that all services are
>>>>up and running.
>>>
>>>Winlogon screen is displayed long before all services are up and running.
>>>
>>>--
>>>Maxim Shatskih, Windows DDK MVP
>>>StorageCraft Corporation
>>>maxim@storagecraft.com
>>>http://www.storagecraft.com
>>>
>>>
>>
>>
>
>--
>../ray\..


Re: Winlog screen displayed by Maxim

Maxim
Wed Mar 23 15:04:29 CST 2005

> Now I have come up with a solution to this problem. In my research I
> have found that the RemoteValidation group is started towards the end
> of the boot up process. It looks like on most systems the only
> service in this group is netlogon. What I am going to do is create a
> service and place it in this group. All this service will do is write

Very good idea.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com