By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 1,735 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

Who is logged on Win2003 Server?

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I think this is what you want:

MessageBox.Show(Environment.UserName)
Nov 21 '05 #2

P: n/a
"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/>

Nov 21 '05 #3

P: n/a
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

"Crouchie1998" <cr**********@discussions.microsoft.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I think this is what you want:

MessageBox.Show(Environment.UserName)

Nov 21 '05 #4

P: n/a

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OK**************@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
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.