Jump to content

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


Recommended Posts

Posted

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?

Posted

Run it as a startup script it will help.

 

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

 

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

  • Thanks 1
Posted (edited)
Run it as a startup script it will help.

 

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

 

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?

Edited by jamin100
Posted

We use GPP, as stated above, for this sort of stuff and it works well.

 

User Config > Preferences > Windows Settings > Files

 

Pretty simples.....:)

 

Andrew

Posted
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

Posted

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

Posted
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.

Posted (edited)

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?

Edited by jamin100
Posted

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?

Posted
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.

Posted
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?

Posted
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

Posted
Permissions looks about right but have you checked the subfolders? you could try 'Replace all child object permissions with inheritable permissions from this object' to force all subdirectories and files to have the same permissions, then test.
Posted
but wont that mean that it still slows the start menu down?

 

How would it? The start menu contains a few hundred kilobytes of shortcuts. Copying them on login would take seconds on any network, even a slow one! Microsoft's guidance is that you should enable offline files when using redirected folders, else you're risking things disappearing randomly.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...