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

Username

P: n/a
Does anyone know how to find the currently logged on user
in Windows 2000 using VB.NET? I have an app that does some
logging and I want to log the current username along with
other stuff.

Thanks.
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <0a****************************@phx.gbl>, Iceman wrote:
Does anyone know how to find the currently logged on user
in Windows 2000 using VB.NET? I have an app that does some
logging and I want to log the current username along with
other stuff.

Thanks.


System.Environment.UserName - The name of the person logged on to the
system who started the current thread.

HTH
--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #2

P: n/a
* "Iceman" <an*******@discussions.microsoft.com> scripsit:
Does anyone know how to find the currently logged on user
in Windows 2000 using VB.NET? I have an app that does some
logging and I want to log the current username along with
other stuff.


'Environment.UserName'.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

P: n/a
Thanks. That is exactly what I wanted.

-----Original Message-----
In article <0a****************************@phx.gbl>, Iceman wrote:
Does anyone know how to find the currently logged on user in Windows 2000 using VB.NET? I have an app that does some logging and I want to log the current username along with other stuff.

Thanks.


System.Environment.UserName - The name of the person

logged on to thesystem who started the current thread.

HTH
--
Tom Shelton
MVP [Visual Basic]
.

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.