+ Post New Thread
Results 1 to 7 of 7
Windows Thread, Need to copy 2 files to system folder on certain PC's by GPO in Technical; I need to copy 2 files into the system folder of my XP clients. Can some one give me a ...
  1. #1
    tosca925's Avatar
    Join Date
    Aug 2005
    Location
    Midlands
    Posts
    1,547
    Thank Post
    4
    Thanked 4 Times in 4 Posts
    Rep Power
    22

    Need to copy 2 files to system folder on certain PC's by GPO

    I need to copy 2 files into the system folder of my XP clients. Can some one give me a idea how to this with a script at logon on th OU.

  2. #2
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,999
    Thank Post
    120
    Thanked 280 Times in 258 Posts
    Rep Power
    106

    Re: Need to copy 2 files to system folder on certain PC's by

    Will a simple copy or xcopy batch file not suffice? Run as a start up script and it will run with system permissions. Maybe add a check to see if file already exists as well.

  3. #3

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,590
    Thank Post
    109
    Thanked 762 Times in 593 Posts
    Rep Power
    180

    Re: Need to copy 2 files to system folder on certain PC's by GPO

    @tosca: You should run the script at startup (a simple copy will do) so that you don't run into permissions problems writing to C:

  4. #4
    tosca925's Avatar
    Join Date
    Aug 2005
    Location
    Midlands
    Posts
    1,547
    Thank Post
    4
    Thanked 4 Times in 4 Posts
    Rep Power
    22

    Re: Need to copy 2 files to system folder on certain PC's by GPO

    I'm rubbish at scripts, would one of you guys be so kind to give me a example please?

  5. #5
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,999
    Thank Post
    120
    Thanked 280 Times in 258 Posts
    Rep Power
    106

    Re: Need to copy 2 files to system folder on certain PC's by

    Code:
     IF NOT EXIST %systemroot%\myfile.txt copy n:\myfile.txt %systemroot%
    That would suffice. The path would have to be on a mapped drive.
    I can do it in VB script as well but that would mean about 4 more lines of code for the same thing, but that would accept a UNC path.

    You seriously need to learn how to script though your not going to get far in this game without it and it will save you a hell of alot of time when doing certain tasks.

    Start here Microsoft Script center

    I have this book which is the only book from Microsoft I would have said was well worth the money. It's a bit dated now but all of the stuff is still relelvant. This one seems more recent but its only 350 pages compared to 850 pages of the first one......
    Theres plenty of script generators out tere as well which help you learn try the MS site.

  6. #6

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,590
    Thank Post
    109
    Thanked 762 Times in 593 Posts
    Rep Power
    180

    Re: Need to copy 2 files to system folder on certain PC's by GPO

    If you put the file in the NETLOGON share you don't need to map a drive IIRC.

    You do need to learn to script - it is very handy and it looks really cool if you write scripts which output loads of text!

  7. #7

    GrumbleDook's Avatar
    Join Date
    Jul 2005
    Location
    Gosport, Hampshire
    Posts
    9,930
    Thank Post
    1,337
    Thanked 1,781 Times in 1,105 Posts
    Blog Entries
    19
    Rep Power
    594

    Re: Need to copy 2 files to system folder on certain PC's by GPO

    Please note that the first workshop on the conference (after the keynote from Becta) is scripting 101 from Steve Rochford of CNWL.

    I've had a look at his notes and have drooled ... We will try and publish as many of the materials afterwards that we can ... maybe even some vid clips :-)

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 21
    Last Post: 29th December 2007, 10:53 PM
  2. Failed to copy files from CD
    By Dos_Box in forum Learning Network Manager
    Replies: 13
    Last Post: 12th April 2007, 10:42 AM
  3. VB Script ti check for folder and then copy contents to PC
    By tosca925 in forum How do you do....it?
    Replies: 4
    Last Post: 2nd October 2006, 08:15 PM
  4. Copy 2 files to every computer on the network
    By dezt in forum How do you do....it?
    Replies: 7
    Last Post: 5th July 2006, 11:43 AM
  5. script to copy files to machines
    By browolf in forum Scripts
    Replies: 1
    Last Post: 28th November 2005, 10:28 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •