Solved

How to access another computer in VB?

Posted on 1998-09-02
7
171 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
change vba from autofit to 13.5 width? 4 28
MS SQL store procedure to calculate and return result 6 49
Help me. 3 45
vbModal 12 34
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

910 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

22 Experts available now in Live!

Get 1:1 Help Now