I have a problem in getting a list of computers in my workgroup from my windows 8 (x64) system.
In my workgroup there are several computers: some with W7 and some with W8. The W7 computers are able to get a list of all workgroup PCs whereas the W8 computers can not (no result, not even the PC running the code) with the same code.
using (DirectoryEntry workgroup = new DirectoryEntry("WinNT://Workgroup"))
{
foreach (DirectoryEntry childEntry in workgroup.Children)
{
Console.WriteLine(childEntry.Name);
}
}
i was trying the solutions given here: Get computers in a workgroup
does anyone have an idea about this?
update: Visual Studio is run as Administrator for this