LinkZ Posted July 31, 2014 Posted July 31, 2014 I am having problems running a logon script on our 2008 R2 RDS servers. The script is designed to take a file from the users home folder and place it into their profile on the local machine (we use mandatory profiles so they get wiped each log off). I have this setup via a logio script under the user GPO settings. if exist "G:\Chrome" goto 1 if not exist "G:\Chrome" goto end :1 XCOPY "G:\Chrome\bookmarks" "C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default\*" /Y XCOPY "G:\Chrome\First Run" "C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\*" /Y :end This runs fine on our Windows 7 clients, but when it runs on the RDS servers it says the G:\Chrome does not exist so the script exits. The thing is if I run this manually after they have logged in it works just fine. My only guess is that during the logon process the users home folder has not been mapped before the script runs. Is there a GPO perhaps that makes sure that logon scripts run after the users home directory has been mapped or maybe some other way?
Paul_Fielder Posted July 31, 2014 Posted July 31, 2014 I have put a script into the startup folder of the startmenu, when I came across this issue awhile back. Seems to work fine there. Alternatively you could check, wait and check again, maybe a few times then fail.
LinkZ Posted July 31, 2014 Author Posted July 31, 2014 I'll have a look into the startup idea. Tried it now and it didn't even attempt to process it so maybe I have another policy somewhere that stops the startup folder from being used.
jamesreedersmith Posted July 31, 2014 Posted July 31, 2014 Yes trying to run from a mapped drive that probably is mapped yet!! use UNC instead.
LinkZ Posted August 1, 2014 Author Posted August 1, 2014 Always the simple solution. I was getting bogged down in details! Changed G: to %HOMESHARE% and it works every time. Thanks all.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now