| | |
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!
![]() |
•
•
Join Date: Feb 2008
Posts: 2
Reputation:
Solved Threads: 0
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
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.
•
•
Join Date: Feb 2008
Posts: 43
Reputation:
Solved Threads: 2
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...
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...
•
•
Join Date: Feb 2008
Posts: 43
Reputation:
Solved Threads: 2
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.
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.
•
•
Join Date: Feb 2008
Posts: 2
Reputation:
Solved Threads: 0
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
Thanks,
Xer0
•
•
Join Date: Feb 2008
Posts: 43
Reputation:
Solved Threads: 2
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#.
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#.
![]() |
Other Threads in the C# Forum
- Previous Thread: RemoveEmptyEntries Error
- Next Thread: Reading word file
| Thread Tools | Search this Thread |
.net access algorithm angle array asp.net bitmap box broadcast c# capturing check checkbox client combobox control conversion csharp database databasesearch datagrid datagridview dataset datetime dbconnection degrees delegate design development disappear draganddrop drawing encryption enum eventhandlers excel file firefox form format forms function gdi+ grantorrevokepermissionthroughc#.net image input install interface java libraries list loop marshalbyrefobject math monodevelop mouseclick movingimage msword mysql operator path pause photoshop php picturebox pixelinversion platform post programming radians regex remoting richtextbox server sleep socket sql statistics string study system.servicemodel table tcpclientchannel text textbox thread time timer update usb usercontrol validation virtualization visualbasic visualstudio webbrowser winforms wpf wpfc# xml






