Solved

How to access another computer in VB?

Posted on 1998-09-02
7
170 Views
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?
0
Comment
Question by:Nene19
7 Comments
 
LVL 3

Expert Comment

by:HATCHET
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 ?

HATCHET
0
 

Accepted Solution

by:
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

\\<MachineName>\<Directoryname>\<filename>
0
 

Author Comment

by:Nene19
ID: 1432650
SUSDASH, How can I code this in VB?
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:Nene19
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.

0
 
LVL 14

Expert Comment

by:waty
ID: 1432652
I have have VB code to map/unmap drives from other computers.
0
 
LVL 3

Expert Comment

by:HATCHET
ID: 1432653
Nene19,

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.   =)

HATCHET

0
 

Author Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now