+ Post New Thread
Results 1 to 6 of 6
Thin Client and Virtual Machines Thread, Logon script not being processed in Technical; I am having problems running a logon script on our 2008 R2 RDS servers. The script is designed to take ...
  1. #1

    Join Date
    Apr 2007
    Posts
    55
    Thank Post
    9
    Thanked 4 Times in 4 Posts
    Rep Power
    16

    Logon script not being processed

    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.

    Code:
    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?

  2. #2

    Join Date
    Feb 2010
    Posts
    47
    Thank Post
    9
    Thanked 5 Times in 5 Posts
    Rep Power
    10
    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.

  3. #3

    Join Date
    Apr 2007
    Posts
    55
    Thank Post
    9
    Thanked 4 Times in 4 Posts
    Rep Power
    16
    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.

  4. #4
    MordyT's Avatar
    Join Date
    Sep 2012
    Location
    In a computer
    Posts
    503
    Thank Post
    44
    Thanked 74 Times in 69 Posts
    Rep Power
    22
    Use a UNC path instead of G:

  5. #5
    jamesreedersmith's Avatar
    Join Date
    Sep 2009
    Location
    Ruskington
    Posts
    1,178
    Thank Post
    80
    Thanked 261 Times in 233 Posts
    Rep Power
    78
    Yes trying to run from a mapped drive that probably is mapped yet!! use UNC instead.

  6. #6

    Join Date
    Apr 2007
    Posts
    55
    Thank Post
    9
    Thanked 4 Times in 4 Posts
    Rep Power
    16
    Always the simple solution. I was getting bogged down in details!

    Changed G: to %HOMESHARE% and it works every time. Thanks all.

SHARE:
+ Post New Thread

Similar Threads

  1. Logon scripts not running
    By AnnDroyd in forum Windows 7
    Replies: 25
    Last Post: 15th January 2013, 02:47 PM
  2. Replies: 1
    Last Post: 18th September 2009, 09:26 AM
  3. Logon script not being called... HELP
    By AlexB in forum Windows
    Replies: 6
    Last Post: 28th April 2009, 10:42 AM
  4. Logon Script Not on 1 PC
    By karldenton in forum Windows
    Replies: 1
    Last Post: 25th March 2009, 12:05 PM
  5. Replies: 13
    Last Post: 20th February 2008, 04:29 PM

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
  •