Get Windows logged in user name on a network
Hi All,
My requirement is to get the windows logged in user name.
I'm using a computer on a LAN (network).
I used to log in to windows using the user id , say admin.
Once after successful login , we could see the logged in user name on the left top of the pop up , which comes when we click the "*start*" button.
Here , its showing say Administrator
So by using System.getProperty("user.name"); i'm getting the value admin.
[ The same value will be returned , if we use the Java 1.5 statement --> +new com.sun.security.auth.module.NTSystem().getName()+ ]
My question is , how can we retrieve the value Administrator in my java code.
I have no idea on how to add images to the threads. If some one knows..please do reply me so that i can attach the images which will make the problem more clear