"Stephen Corey" <swc@_NOSPAM_wardandsmith.com> wrote in message
news:u$**************@tk2msftngp13.phx.gbl...
I've got a windows service running as NetworkService on a WinXP Pro
machine. Is there a way for it to find the Active Directory account of the
logged on user? I don't mind switching the service to run as a "Domain
Admin" if needed, but I *need* to find out the LDAP path for the user.
There isn't necessarily a _single_ logged on user in light of terminal
services, fast user switching etc.
That said, this link
http://msdn.microsoft.com/library/de...n_sessions.asp
shows how to enumerate all of logons on a system and this link
shows how to get information about each one:
http://msdn.microsoft.com/library/de...nformation.asp
The two links should get you started. Please post follow-up in the kernel
group:
microsoft.public.win32.programmer.kernel
Regards,
Will