Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,363 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Using Visual Studio 2010 - C#
I want to get the computers workgroup name.
I tried both of these on Windows XP:
string workgroupName = Environment.GetEnvironmentVariable("UserDomainName");
string workgroupName = (string)Registry.GetValue(key1, "Workgroup", null);
The first gives me the computer name.
The second is blank.
Please suggest a solution that will work on all versions of Windows.