Home All Groups Group Topic Archive Search About

Who is logged on Win2003 Server?

Author
1 Apr 2005 8:10 PM
Brett
In task manager of Win2003 Server, I can see who is logged on.  I want to
programmatically access this information.  Is there a log file or something
I can access to get it?

Thanks,
Brett

Author
1 Apr 2005 8:33 PM
Crouchie1998
I think this is what you want:

MessageBox.Show(Environment.UserName)
Author
1 Apr 2005 9:29 PM
Brett
That's not it:
"Gets the user name of the person who started the current thread."

I want all users logged onto the Win2003 server box via FTP for example.

Brett

Show quoteHide quote
"Crouchie1998" <crouchie1***@discussions.microsoft.com> wrote in message
news:%23wM9qovNFHA.2468@tk2msftngp13.phx.gbl...
>I think this is what you want:
>
> MessageBox.Show(Environment.UserName)
>
>
Author
1 Apr 2005 9:11 PM
Herfried K. Wagner [MVP]
"Brett" <no@spam.com> schrieb:
> In task manager of Win2003 Server, I can see who is logged on.  I want to
> programmatically access this information.  Is there a log file or
> something I can access to get it?

You can do that using p/invoke:

List of sessions on a system:

Platform SDK: Authentication -- Enumerating Logon Sessions
<URL:http://msdn.microsoft.com/library/en-us/secauthn/security/enumerating_logon_sessions.asp>

Information about each session:

Platform SDK: Authentication -- Retrieving Logon Session Information
<URL:http://msdn.microsoft.com/library/en-us/secauthn/security/retrieving_logon_session_information.asp>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
3 Apr 2005 12:14 AM
Brett
Show quote Hide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:OKsNg8vNFHA.2136@TK2MSFTNGP14.phx.gbl...
> "Brett" <no@spam.com> schrieb:
>> In task manager of Win2003 Server, I can see who is logged on.  I want to
>> programmatically access this information.  Is there a log file or
>> something I can access to get it?
>
> You can do that using p/invoke:
>
> List of sessions on a system:
>
> Platform SDK: Authentication -- Enumerating Logon Sessions
> <URL:http://msdn.microsoft.com/library/en-us/secauthn/security/enumerating_logon_sessions.asp>
>
> Information about each session:
>
> Platform SDK: Authentication -- Retrieving Logon Session Information
> <URL:http://msdn.microsoft.com/library/en-us/secauthn/security/retrieving_logon_session_information.asp>
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>

If some one logs onto the box via say Serv-U (non IIS) FTP server, while the
above hold the user value some how?

Thanks,
Brett