How to access another computer in VB?

Posted on 1998-09-02
Last Modified: 2010-04-30
Hello.  I need to access a lot of other computers in my program and right now the only way I know is to map their hard drive in my computer but I DON't WANT that because I can only map until drive Z.  Is there another way?
Question by:Nene19
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 1432648
Be more specific about what you want to be doing.  I've done programs before that go out and change registry settings on network computers before, but that sounds different.  Do you just want to see them and their shared direcotries, or what ?


Accepted Solution

susdash earned 100 total points
ID: 1432649
If you ae using Win NT, then you can access other computers or servers by specifying the  the servername and filename by the following command line


Author Comment

ID: 1432650
SUSDASH, How can I code this in VB?
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 1432651
What I really need to do is to make a code that copies files to various computers in our network.  
\\<MachineName>\<Directoryname>\<filename> is okay to access the file I want but how can I code this?

Thank you.

LVL 14

Expert Comment

ID: 1432652
I have have VB code to map/unmap drives from other computers.

Expert Comment

ID: 1432653

If all you want to do is copy filies from say your computer to a network server or a computer on the network, you'd use code similar to the code below to do it :

  Dim SourceFile, DestinationFile   ' Define Variables  
  SourceFile = "C:\ReadMe.txt"   ' Define source file name.
  DestinationFile = "\\NT_Server\SharedDir\ReadMe.txt"   ' Define target file name.
  FileCopy SourceFile, DestinationFile   ' Copy source to target.

You can write a routine that will go through a loop and tell you what all the names of the computers on the network are and the total number of computers on the network, but that's a whole different story.   =)



Author Comment

ID: 1432654
What if I want to copy file to another workstation in the network?  How will I do that?

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question