Computer's Workgroup or Domain Name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When you go to "MyComputer" and get properties and select "Computer Name",
you get the Domain or Workgroup a computer belongs to.
I have looked thru MSDN library, the Internet, the Registry and in all files
on my computer and cannot find how to retrieve this information in VB.Net
2005.

This information is essential for our system implementation.
I have tried:
NetworkInformation.IPGlobalProperties.GetIPGlobalProperties
but it does not get the info for a 'workgroup', only a 'domain'.
I have also tried:
SystemInformation.UserDomainName
but still get nothing but the computer name if it is in a workgroup.
 
I think if your not logged into a domain, you will only get the computer
name - is your dev machine in a domain?

--
Regards

John Timney
Microsoft MVP

Spyder said:
The app returned the computer's name on the pc that is just part of a
workgroup.
On my dev machine, it returned the domain name.
 
The computers I need the workgroup name from are not part of a domain.
I can clearly see the name in the properties dialog box, so, I know it's
somehow set on the computer. I just have found no way to retrieve it.
 
Back
Top