Copying a File to a specific Directory on multiple Computers

Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Feb 2008
Posts: 2
Reputation: xer0 is an unknown quantity at this point 
Solved Threads: 0
xer0 xer0 is offline Offline
Newbie Poster

Copying a File to a specific Directory on multiple Computers

 
0
  #1
Feb 27th, 2008
I want to copying a specific shortcut that is on my computer to multiple Computers on our network.


Source Shortcut

\\"SourceComp\c$\Documents and Settings\Source.User\Desktop\"Shortcut"

Destination

\\"CompName"\c$\Documents and Settings\All Users\Desktop\"Shortcut"

So if I want to copy Source Shortcut to Destination, What will I need to use mainly? ( can I get a little help with the code structure? I'm extremely amature .

Any help will be greatly appreciated.

Xer0
Last edited by xer0; Feb 27th, 2008 at 3:08 pm.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 43
Reputation: bbqchickenrobot is an unknown quantity at this point 
Solved Threads: 2
bbqchickenrobot bbqchickenrobot is offline Offline
Light Poster

Re: Copying a File to a specific Directory on multiple Computers

 
0
  #2
Feb 27th, 2008
If you have a true network (not a workgroup) setup you can use a domian controller to do this. Assuming you have windows server 2000/2003/2008 you can add a logincript to the policy and have a vbscript (or PowerShell now) copy this to the machines.

That way, whenever anyone logs on to the network (new machine or not) they receive the file.

iF you dont' have a network server or if that's too complicated for you - you can use powershell or windows script host (WSH) via vbscript or jscript (go vbscript) to the desktops. Your user will need the appropriate newtork permissions to do so however...
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 43
Reputation: bbqchickenrobot is an unknown quantity at this point 
Solved Threads: 2
bbqchickenrobot bbqchickenrobot is offline Offline
Light Poster

Re: Copying a File to a specific Directory on multiple Computers

 
0
  #3
Feb 27th, 2008
or... you can use this option...

www.alintex.com

and use .NET to perform the code. THis requires the alintext script host to be intalled on your computer however...

I would actually go this route, although it is not the traditional route. It may be an easier path/codign experience that using old school WSH with VBScript. IMO.
Last edited by bbqchickenrobot; Feb 27th, 2008 at 4:05 pm.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 2
Reputation: xer0 is an unknown quantity at this point 
Solved Threads: 0
xer0 xer0 is offline Offline
Newbie Poster

Re: Copying a File to a specific Directory on multiple Computers

 
0
  #4
Feb 27th, 2008
Yeah, It's a Domain Network and yeah, I looked into trying to do this via "Group Policy Management" and I couldn't get it working right. I have used PowerShell a little bit. I'll look further into that. I am learning C# though and have done a few things with it - never anything that deals with moving files though.

Thanks,
Xer0
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 43
Reputation: bbqchickenrobot is an unknown quantity at this point 
Solved Threads: 2
bbqchickenrobot bbqchickenrobot is offline Offline
Light Poster

Re: Copying a File to a specific Directory on multiple Computers

 
0
  #5
Feb 27th, 2008
File operations in C# are trivial and super easy to code!!!

I would totally recommend that option if this is a one-time type of thing.

Ya, GPO and login scripts have a sort of quirky/fussy setup. Back in the days of my sys-admin/developer/tech-support role I had to do this. It took some fussing around, but got it to eventually work. I found that maintaining a vbscript file to be a pain compared to writing .net code.

YOu can also use a .net exe to run at bootup/startup for computers on your domain... this can then handle adding icons and what not to your workstations. You could also technically build a MSI setup package that will do this as well.

There are many different ways to do this... again, .net (C#) is my preferred method. Post back if you have any specific questions about file operations in C#.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1
Reputation: egriggs is an unknown quantity at this point 
Solved Threads: 0
egriggs egriggs is offline Offline
Newbie Poster

Re: Copying a File to a specific Directory on multiple Computers

 
0
  #6
Jan 15th, 2009
was there any pre made code or program that could do this i have very little experience with logon scripts and vbscript and the such so any help in that regard would be of help to me
Last edited by egriggs; Jan 15th, 2009 at 3:37 pm.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Copying a File to a specific Directory on multiple Computers

 
0
  #7
Jan 15th, 2009
Easiest way is to have a hidden share, and for the file to be copied as part of a login script
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC