Windows Service - Determine if someone is logged in at the console

W

whoopes

Subject pretty much spells it out. The service is running as
localsystem. Here's what I've tried and the results:

1. WMI - Win32_ComputerSystem class - The issue here is that on some
workstations this class is restricted or doesn't return data.

2. WMI - Win32_Process class - Seems to be reliable in regards to
returning data but only good to determin if someone is logged on not
who.

3. Win32::Lanman::NetWkstaUserEnum - Seems to cache logons until the
system is restarted.

Win32::LoggedonUser is not an option. Will only work with interactive
scripts such as a logon script.


Any ideas???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top