Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1627
  • Last Modified:

System.IO connection to a remote computer using C# 2005

I have a need to copy a few files to computers in my intranet.  Currently I am accessing them via Run \\W353F03b61B (for instance) and then copying from my local machine to the targeted workstations.  As the  list of machines to receive the files becomes longer, the task becomes more tedious and uncertain.  I would like to build a utility in C# VB 2005 to do the copying and compile a report to be emailed to the user telling them that the process completed or had a problem.  I see how to do this on a local machine, but am having trouble locating an example of doing it to a remote computer.  Can anyone supply me with help on this matter?
0
daforga
Asked:
daforga
  • 4
  • 3
1 Solution
 
KPMT-TechnicianCommented:
The files being copied like an install of software?  I'm asking because if you create a msi install of the files and then use a group policy to push the install down to the user the next time they log in.  You can apply i to the a Users OU or a Machine OU.  This appoach is for a domain only.  The notification would be during the install of files.  Just a thought; or are you looking for a little GUI to select machines then xCopy the files?  Because the notification would get alittle bit more coplicated this way.  Sounds like you'd spend less time creating the msi.

Robert Fidler
Springfield, Missouri
     
0
 
daforgaAuthor Commented:
No, not an install.  It is a complecated situation.  I have to deliver new files to UAT machines several times a day when implenentation is occuring.  I am not on the Wise license and that is how we build MSIs.  It is not always feasible for me to have to have the team member with the Wise license to log in for me so that I can build an MSI package.  The method used here for UAT updates, until the code is frozen and the install packages built, is to copy dlls from a build to the UAT , Product Assurance and chosen business user's workstations.  I was hoping there might be a way to do that, but have not been able to find one yet.  When that happens, it is usually a sign that it is not good practice to try what I have in mind.  I will leave this issue open for the rest of the day.  If there are no answers close to my needs, I will award you the points for getting to me with a best practice solution.  
Thanks
David
Orange County CA
0
 
KPMT-TechnicianCommented:
Ok, so are you looking for a little GUI to select machines then xCopy the files?  Just like a management console for say Symantec and how they push AV to client machines?
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
daforgaAuthor Commented:
Yes, Robert.  That is what I am looking for, but I don't know how to get around the "\\" constraint.  I am looking to try to connect to "computerx" which is in my intranet and available from my Run by typing \\Computerx\C$.  In dotnet I can not name the above path as the target for the System.IO filecopy, for instance.  It would be nice to have a list of my target machies in a checked listbox, pick the desired machines and make the file updates and then top the whole thing off with email notification to the user at the target machine all in one fell swoop.  Thank you for your continued interest in this issue.
David
0
 
KPMT-TechnicianCommented:
Not being able to pass the string "\\Computerx\C$" is resolved two ways.
1. string path = @"\\Computerx\C$";  // @ is a literal notation.
2. string path = @"\\\\Computerx\\C$";

We could query the LDAP for all the machines in the domain to create a list.
But the email notification would need you to enter in the email address that relates to each machine.

Which direction would you like to go with it?

Robert Fidler
0
 
KPMT-TechnicianCommented:
I've found some code on another forum and added a bit myself and have started creating a Management Console that finds Network Machines.  

www.robertfidler.com/downloads/ListNetworkComputers.rar

I'll be removing this in a week.  I'm hoping this will get you started in the direction your looking to go.

Robert Fidler
Springfield, Missouri
0
 
daforgaAuthor Commented:
Robert,
You have been very helpful in this matter, Thank you so much.
David
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now