Jump to content

Recommended Posts

Posted

I've tried this both locally and via GPO and am having no luck. I have a folder sitting in c:\users\public that I want copied to each AD user's c:\users\%username%\AppData\Roaming\LOCAL\ folder on login. The script works fine if I browse to the location and manually run it. I cannot however, get it to auto run on login.

 

GPO setting:

https://drive.google.com/open?id=0B5WwyYQ7JxrsclhsTkg2THFiRUE

 

The user definitely has privileges to the file, I am able to browse to the network share and run it manually.

Posted (edited)

Probably because I'm somewhat new to GP and didn't know about that. :)

 

I only want the folder copied on 4 machines, and I do not need to have it copied on each login. The script I have now looks for a file and if that file is there nothing is done. If the file changes, then it'll copy it again. This helps when there is an update.

Edited by kcalderw
Posted
Probably because I'm somewhat new to GP and didn't know about that. :)

 

I only want the folder copied on 4 machines, and I do not need to have it copied on each login. The script I have now looks for a file and if that file is there nothing is done. If the file changes, then it'll copy it again. This helps when there is an update.

 

GPP can do all that :)

 

You can use item-level targeting to make sure it only runs on machines you want to run it on (or just apply the Group Policy Object on the relevant OU as normal), and if you use the Update action, it compares the files and only copies them over if the source is newer (where Replace always copies).

Posted

Ah, fair enough.

 

Have you tried launching the script with User Config > Policies > Admin Templates > System > Logon > Run these programs at user logon? That delays the script until the desktop has appeared, and runs explicitly in the user context, so if they have permissions (to that folder on C:\ as well as the script file, wherever that is) it should work.

 

Apply it to the OU containing the four computers you need and make sure loopback policy processing (Computer > Policies > Admin Templates > System > Group Policy > User Group Policy loopback processing mode = Merge) is on.

 

Caveat: only one script can ever be run this way. If you already run another script this way, this policy will overwrite it, or be overwritten by it. It acts more like a normal group policy setting in that regard, where the more specific setting "wins", unlike the Windows Settings > Scripts section which accumulates and runs everything specified in every GPO.

Posted
ifmits for all users but only on 4 pcs why not just copy the script to the C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp folder on those pcs (wither with gpp or however

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