Find All Computer In Workgroup Or Domain


How Can I Find All The Computer In "Workgroup" Or In "Domain" and map the selected computer "C$" drive?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

download this example  to see how to enum the network then use

then use like this to map the drives:

procedure TForm1.Button3Click(Sender: TObject);
 NetResource: TNetResource;
  { fill our TNetResource record structure }
 NetResource.dwType       := RESOURCETYPE_DISK;
 NetResource.lpLocalName  := 'S:';
 NetResource.lpRemoteName := '\\server\public';
 NetResource.lpProvider   := '';
{ map our network drive using our TNetResource
 record structure }
      '', {Clave o vacio /Password or empty}
      '', {Nombre del usurio o vacio/User name o vacio}
{In that example, we will connect '\\server\public' to S:,
 without username neither password }

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hi barry,
now you will catch me soon
meikl ;-)
somehow i doubt it ;-)
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

traustiAuthor Commented:
I want to make a Delphi app thats scans all network and find all active computers in the network and show me in listbox
hello did you not try the example i show you?
are you new to delphi?
if you need i change the example to listbox and i presume you want to add/map the found resources on a buttonclick.
traustiAuthor Commented:
Yes thank you
traustiAuthor Commented:
Yes Thanks
ok wait for a bit (i eat tea first the missus is shouting me ;-)
do you need this in listbox or was the demo in treeview ok?
i tried listbox but could only get to computer names not the drivs as well :-(
but if it really need to be listbox ill ask a question to get someone else to do it(meikl listening :-)
btw how will you know the c drives? the enum network only gets the sharename not the actual drive .
are your share names like c:
allways listening :-)
traustiAuthor Commented:
I will be able to get all the computers in the workgroup or domain e.g "TJONDLD" <-- this is the workgroup --> "TJON_TRAUSTI" <-- this is the computer name.

I will be able to get all the workgroups in treeview or listbox and double click and the i see all the computers in that workgroup. And when i click on one computer then i will be able to map the C$ drive and make shortcuts under c:\winnt\profiles\...\start menu\programs\

Is this possible?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.