Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Detect Remote Workstation Login from domain server.



Permlink Replies: 1 - Last Post: Jul 16, 2017 8:19 PM Last Post By: Nigel Tavendale
Clement Doss

Posts: 133
Registered: 9/19/00
Detect Remote Workstation Login from domain server.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 27, 2017 3:01 PM
Hi,

I would like to write a small windows service that will run in a Windows Server OS.
All the workstations are in a LAN and properly registered in the Domain.
When any user log into any workstations , I would like my service to be notified and get some informations like Machine name, Login UserName and timestamp.
Is this possible? Is there any sample code or article?
I will use Delphi 10.x to write the service.

TIA,
Clément
Nigel Tavendale

Posts: 14
Registered: 9/22/03
Re: Detect Remote Workstation Login from domain server.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 16, 2017 8:19 PM   in response to: Clement Doss in response to: Clement Doss
You can do this but it is not simple. Essentially you would install a service on the Domain Controller and the service would use the EvtLog API to be notified of any additions to the Security Event Log. Every time there is a successful login and event should be recorded there.

Using the API your service would be notified of the login. You can find the ugly details here:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa385771(v=vs.85).aspx


Clement Doss wrote:
Hi,

I would like to write a small windows service that will run in a Windows Server OS.
All the workstations are in a LAN and properly registered in the Domain.
When any user log into any workstations , I would like my service to be notified and get some informations like Machine name, Login UserName and timestamp.
Is this possible? Is there any sample code or article?
I will use Delphi 10.x to write the service.

TIA,
Clément
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02