473,748 Members | 9,416 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get the names of the availalbe computers on your LAN/Workgr

Hi, I need to get a list of the computers in my WorkGroup LAN, with its names
in a similar way you get the available Drives from a PC with
DriveInfo.GetDr ives(). Is there a managed class that provide this, if not,
coudl you provide me some guiadance with unmanaged APIs or wrappers.
--
Fernik
http://www.fernik.com.ar
Jan 3 '08 #1
2 1860
Hello Fernik,

use NetServerEnum WinAPI method
The sample and description how to do in from managed code is there http://www.codeproject.com/KB/IP/Lis...Computers.aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
FHi, I need to get a list of the computers in my WorkGroup LAN, with
Fits names in a similar way you get the available Drives from a PC
Fwith DriveInfo.GetDr ives(). Is there a managed class that provide
Fthis, if not, coudl you provide me some guiadance with unmanaged APIs
For wrappers.
F>
Jan 3 '08 #2
Hi Fernik,

As for looping network resources in local network, there are several means
such as RAW network API, wmi or ADSI:

here are some web threads discussing on this, you can have look to see
whether they help some:

API approach:

#list of computers on local network
http://www.csharpfriends.com/Forums/...x?PostID=29925

#Using Network Functions in Visual C#.NET (Part II - Group Functions)
http://www.csharphelp.com/archives2/archive440.html
ADSI approach:

#Inventory of Domain Users and Computers Using ADSI
http://www.serverwatch.com/tutorials...le.php/1476791

#List of computers on local network
http://www.csharpfriends.com/Forums/...x?PostID=29925
WMI:

http://www.siccolo.com/Articles/Code...k_Browser/Buil
d_Local_Network _Browser.html

http://www.activexperts.com/activmon...t/wmi/samples/

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

=============== =============== =============== =====

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>From: =?Utf-8?B?RmVybmlr?= <fe****@communi ty.nospam>
Subject: How to get the names of the availalbe computers on your LAN/Workgr
Date: Wed, 2 Jan 2008 18:12:01 -0800

Hi, I need to get a list of the computers in my WorkGroup LAN, with its
names
>in a similar way you get the available Drives from a PC with
DriveInfo.GetD rives(). Is there a managed class that provide this, if not,
coudl you provide me some guiadance with unmanaged APIs or wrappers.
--
Fernik
http://www.fernik.com.ar
Jan 3 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2529
by: Keith Smith | last post by:
My software will be installed on peer-to-peer networks and sometimes 2000/2003 domain networks. How can I get a list of the computers on the network? My goal is to search each of these computers for a particular shared folder. Thanks.
8
2704
by: Vanga Sasidhar | last post by:
I have four computers. One computer - Win XP Two computers - Win 98 One computer - Win ME I designed some pages in my computer having Win XP operating system. I installed dot net framework 1.1 and web matrix is used for asp .net code
2
2165
by: Thomas Müller | last post by:
Hi, I need a way to find the names of the computers that are reachable over a network. Ideally when it is executed it should report back wich computernames are present. I have seen one solution with System.DirectoryServices but that doesn't work for me because the required isn't installed on the computer.
0
1134
by: Steve D | last post by:
Hi. I am using the following code to try and populate two list boxes. The first, lstWorkgroups, is to show a list of the workgroups on my network. The second, lstComputers, is to show a list of the computers under each workgroup. This code works fine until it finds something it doesn't like when searching for the computers within a workgroup. For some reason, objFolder3.Items.Count and objFolder4.Items.Count get set to zero, and there's no...
4
1909
by: lgbjr | last post by:
Hi All, I need to retrieve a list of computer names that are available on a network and a list of databases that are available in MSDE2K. Can someone point me in the right direction for retrieving this type of info. TIA! Lee
3
1262
by: shuisheng | last post by:
Dear All, Assume each objects in my code has its own name. And they cannot be the same. Is there any good way to avoid the repeated names? Bests, Shuisheng
3
4748
by: Don | last post by:
I am writing a program and need to identify the friendly names of ports. I have queried the registry key HKEY_LOCAL_MACHIN\\EHARDWARE\\DEVICEMAP\\SERIALCOMM, but all that tells me is which ones actually exist. Is there a way to get the names of the devices, such as those shown in the Device Manager under "Ports"? Thanks,
4
1575
by: CoachBarker | last post by:
I hope I can explain this. VB.net Visual Studio 2005 What I need to do is take the names in a text file and read them into my application. That I have done and put them in an array but I don't want to write them to the console. Here it is in a module. Module GetApplicationName ' Function Name: GetApplicationName() ' Purpose: To get the names of the applications that can be installed on the computers ' Created...
17
5566
by: John Salerno | last post by:
Let me see if this question even makes sense...I'm reading Core Python Programming and I jumped ahead to the more specific topics like network programming. I plan to follow along with the example in that chapter and create a socket connection between my desktop and laptop. However, these two computers are already connected on my home network (using the Windows Network Setup Wizard), so I was wondering if this will have any effect on what...
0
8984
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9312
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8237
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.