+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
Windows 7 Thread, Windows 7 & Logon Script to copy files to local HD. in Technical; I had this working in september but now something seems to be stopping it. I have folder redirection in place ...
  1. #1
    jamin100's Avatar
    Join Date
    Feb 2008
    Location
    Birmingham
    Posts
    1,038
    Thank Post
    141
    Thanked 98 Times in 78 Posts
    Rep Power
    33

    Windows 7 & Logon Script to copy files to local HD.

    I had this working in september but now something seems to be stopping it.

    I have folder redirection in place for Desktop & Start Menu icons. These are redirected to a local folder on the c:\
    I had / have a .cmd file that on machine start up syncs the network icon store with the local icon store. This was working for everyone in september but I've just installed some new software and added some new Icons but now they are not being copied over to the local icon store.

    My script is set to run at startup for all my machines and the script lives in the NETLOGON folder and looks like this:


    @echo off
    Rem sync icons
    \\server1\netlogon\robocopy.exe /IS \\server1\w7icons\ c:\localresources\icons\ /MIR

    The script works as if i run it manually as an administrator then it runs fine.

    Any ideas or better ways of doing it?

  2. #2

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,942
    Thank Post
    886
    Thanked 1,694 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    Run it as a startup script it will help.

    Also with Windows 7 it has robocopy built in. So i would just do this.

    Code:
    robocopy "\\server1\w7icons" "c:\localresources\icons" /MIR

  3. Thanks to FN-GM from:

    jamin100 (6th December 2012)

  4. #3

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    4,954
    Thank Post
    862
    Thanked 1,443 Times in 991 Posts
    Blog Entries
    47
    Rep Power
    616
    Or just Group Policy Preferences?

  5. Thanks to sonofsanta from:

    jamin100 (6th December 2012)

  6. #4
    jamin100's Avatar
    Join Date
    Feb 2008
    Location
    Birmingham
    Posts
    1,038
    Thank Post
    141
    Thanked 98 Times in 78 Posts
    Rep Power
    33
    Quote Originally Posted by FN-GM View Post
    Run it as a startup script it will help.

    Also with Windows 7 it has robocopy built in. So i would just do this.

    Code:
    robocopy "\\server1\w7icons" "c:\localresources\icons" /MIR
    Thanks, Ive amended my script.

    Right, so with the above script running from startup it still doesnt work.

    gpresult shows that the script ran fine.

    If I manually run the script it works. I deleted icons folder in c:\localresources to see if it would re-create it and all the folders in it. however, when I rebooted the machine the script ran but just created the icons folder and nothing else thats in it. Permissions issue reading the contents of the icons folder thats a share maybe?
    Last edited by jamin100; 6th December 2012 at 10:20 AM.

  7. #5
    adhutton's Avatar
    Join Date
    Dec 2008
    Location
    Northeast England
    Posts
    399
    Thank Post
    164
    Thanked 86 Times in 64 Posts
    Rep Power
    54
    We use GPP, as stated above, for this sort of stuff and it works well.

    User Config > Preferences > Windows Settings > Files

    Pretty simples.....

    Andrew

  8. #6
    jamin100's Avatar
    Join Date
    Feb 2008
    Location
    Birmingham
    Posts
    1,038
    Thank Post
    141
    Thanked 98 Times in 78 Posts
    Rep Power
    33
    Quote Originally Posted by adhutton View Post
    We use GPP, as stated above, for this sort of stuff and it works well.

    User Config > Preferences > Windows Settings > Files

    Pretty simples.....

    Andrew
    Thanks, yeh ive tried that too and again, i just get the "icons" folder created but not the contents of the folder

  9. #7

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,942
    Thank Post
    886
    Thanked 1,694 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    GP Preferences are not ideal for this. It would be a lot of work due to the amount of shortcuts that exist.

  10. #8
    adhutton's Avatar
    Join Date
    Dec 2008
    Location
    Northeast England
    Posts
    399
    Thank Post
    164
    Thanked 86 Times in 64 Posts
    Rep Power
    54
    Hang on.....i've just re-read what you originally wrote. I think I understand what you are tryimg to do....

    Why dont you just redirect the Desktop & Start Menu icon folders to a central location on your server and then place all of your shortcuts in there?

    They will be automatically updated on the PCs when a user logs on...

    Andrew

  11. #9
    jamin100's Avatar
    Join Date
    Feb 2008
    Location
    Birmingham
    Posts
    1,038
    Thank Post
    141
    Thanked 98 Times in 78 Posts
    Rep Power
    33
    Quote Originally Posted by adhutton View Post
    Hang on.....i've just re-read what you originally wrote. I think I understand what you are tryimg to do....

    Why dont you just redirect the Desktop & Start Menu icon folders to a central location on your server and then place all of your shortcuts in there?

    They will be automatically updated on the PCs when a user logs on...

    Andrew
    Because I find if a wireless client looses connection to the network for whatever reason then all the icons go too. But by having the icons on the local HD then if they briefly loose network connectivity then they can carry on and when they get connectivity back they can access all the programs still.

    I also found that by having the icons mapped to the network share really slowed the start menu down whilst the computer was trying to find the location of the programs that the icons were pointing too.

  12. #10
    simongrahamuk's Avatar
    Join Date
    Jun 2006
    Location
    Durham, UK
    Posts
    231
    Thank Post
    40
    Thanked 12 Times in 12 Posts
    Rep Power
    19
    easiest way to do this is to simply map a drive letter to the location of your files as part of the script, then at the end of the script un map it.

  13. #11
    jamin100's Avatar
    Join Date
    Feb 2008
    Location
    Birmingham
    Posts
    1,038
    Thank Post
    141
    Thanked 98 Times in 78 Posts
    Rep Power
    33
    UPDATE: so it looks like its not copying the folders in the "icons" directory.

    On the server I have a share setup as \\server1\W7Icons

    In that share are the following folders

    Staff---------
    ----------- Desktop
    ----------- Start Menu
    ----------------- All Programs

    Students------
    ------------ Desktop
    ------------ Start Menu
    ---------------- All Programs

    MIS ---------
    ------------ Desktop
    ------------ Start Menu
    ---------------- All Programs

    With the script the "icons" folder gets created in c:\localresources

    But non of the subfolders do.

    I have just put a .txt document in the root of the "icons" folder on the share and that got copied ok.

    Im using the /MIR switch in the script which as i understand it mirrors the contents of the root folder?
    Last edited by jamin100; 6th December 2012 at 10:55 AM.

  14. #12
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    42
    Permissions maybe?

    Whats the NTFS permissions on the localresources folder (dont think this one is the issue but worth checking)?

    Whats the Share permissions on your server? i.e. does it have Domain Computers in it? and what is the NTFS permission on that folder i.e. does all folders inside W7Icons allow access to Domain Computers?

  15. #13

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,680
    Thank Post
    516
    Thanked 2,451 Times in 1,897 Posts
    Blog Entries
    24
    Rep Power
    832
    Quote Originally Posted by jamin100 View Post
    Because I find if a wireless client looses connection to the network for whatever reason then all the icons go too. But by having the icons on the local HD then if they briefly loose network connectivity then they can carry on and when they get connectivity back they can access all the programs still.

    I also found that by having the icons mapped to the network share really slowed the start menu down whilst the computer was trying to find the location of the programs that the icons were pointing too.
    You need to enable offline files on the share of the redirected start menu. If you don't have it enabled, you have above happening. If you do, the files are cached locally automatically.

  16. #14
    jamin100's Avatar
    Join Date
    Feb 2008
    Location
    Birmingham
    Posts
    1,038
    Thank Post
    141
    Thanked 98 Times in 78 Posts
    Rep Power
    33
    Quote Originally Posted by localzuk View Post
    You need to enable offline files on the share of the redirected start menu. If you don't have it enabled, you have above happening. If you do, the files are cached locally automatically.
    but wont that mean that it still slows the start menu down?

  17. #15
    jamin100's Avatar
    Join Date
    Feb 2008
    Location
    Birmingham
    Posts
    1,038
    Thank Post
    141
    Thanked 98 Times in 78 Posts
    Rep Power
    33
    Quote Originally Posted by apeo View Post
    Permissions maybe?

    Whats the NTFS permissions on the localresources folder (dont think this one is the issue but worth checking)?

    Whats the Share permissions on your server? i.e. does it have Domain Computers in it? and what is the NTFS permission on that folder i.e. does all folders inside W7Icons allow access to Domain Computers?
    This is what I thought but the permissions are

    Share: w7icons
    Everyone - Full
    System - Full
    Domain Users - Read
    Domain Computers - Full
    Administrators - Full

    NTFS Permissions:
    Everyone - Read & Execute
    CREATOR OWNER - None
    SYSTEM - Full
    Domain Computers - Full
    Administrators - Full

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 12
    Last Post: 29th September 2012, 09:27 PM
  2. Request for script to copy files
    By TechSupp in forum Scripts
    Replies: 5
    Last Post: 15th July 2010, 01:34 PM
  3. Replies: 5
    Last Post: 17th September 2009, 10:52 PM
  4. Replies: 19
    Last Post: 20th June 2006, 03:53 PM
  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
  •