I'm writing a Windows service using The service will run at every system startup. I want this service to wait until an user logs on to the system & then do something. Can anybody tell me how can the service determine the following: When has someone logged on? I mean, being an Automatic service, it'll run even before ANY user logs on, but I want it to trigger some action ONLY WHEN any user logs on. How can the service obtain currently logged in username? Is there any way to start a service