Solved

How to access another computer in VB?

Posted on 1998-09-02
7
173 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel VBA combine two working workbooks 8 55
VB6 Compile Compatibility Issue 4 102
How to compare ms sql hashbytes results within vb6 5 75
Spell Check in VB6 13 114
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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 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…

809 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