Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Current Windows User

Status
Not open for further replies.

MSRez

Programmer
Dec 22, 2004
57
EU
I'm writing a program that requires fetching the current Windows user that is logged in. I did find a package called swin that seems to be able to do this but it costs a lot of money to buy which isn't really an option for something as simple as this so I'm wondering if there is an alternative.

I imagine it involves looking into the registry and getting some data.
 
I think I've actually found the answer for anyone interested... it's simply:

System.getProperty("user.name");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top