Hi,
how can I obtain the name which is displayed on top of the Windows START menu?
Mike
Printable View
Hi,
how can I obtain the name which is displayed on top of the Windows START menu?
Mike
First add System.DirectoryServices as reference to your project, next use the next code
Code:string servername = Environment.UserDomainName;
string username = Environment.UserName;
using (System.DirectoryServices.DirectoryEntry domain = new
System.DirectoryServices.DirectoryEntry(string.Format("WinNT://{0}/{1}", servername, username))) {
string fullName = domain.Properties["FullName"].Value.ToString() ;
}
Thx!