G
Guest
I wrote a VB .NET Service to restart the computer when certain business rules
are triggered (such as not being rebooted in x days, no users logged on, time
is 1-3 am, etc.).
I am currently using a sloppy technique of checking the Registry to
determine if and who is logged on.
I would like to use a Microsoft sanctioned best-practice method of
determining if anyone is logged on (and their Username and all Process Names
that the User is running, etc.) from the Service. It will run on XP Pro, but
eventually Server 2003, etc.
I think I should be using the WindowStation and Desktop related API calls,
but cannot find good documentation on how to do it from Visual Basic .NET and
the proper sequence. I need some code snippets for something like,
EnumDesktops(), OpenWindowStation(), etc.
Any help from Microsoft ? (or anyone else that has done this).
are triggered (such as not being rebooted in x days, no users logged on, time
is 1-3 am, etc.).
I am currently using a sloppy technique of checking the Registry to
determine if and who is logged on.
I would like to use a Microsoft sanctioned best-practice method of
determining if anyone is logged on (and their Username and all Process Names
that the User is running, etc.) from the Service. It will run on XP Pro, but
eventually Server 2003, etc.
I think I should be using the WindowStation and Desktop related API calls,
but cannot find good documentation on how to do it from Visual Basic .NET and
the proper sequence. I need some code snippets for something like,
EnumDesktops(), OpenWindowStation(), etc.
Any help from Microsoft ? (or anyone else that has done this).