none
Batch file being specify in GP logon does not run right after user logon.

    Question

  • I specify a batch file under USER CONFIGURATION /POLICIES/WINDOWS SETTINGS/SCRIPT/LOGON of my GP to copy an ini file to a folder in users' roaming file.  

    For some reason, the destination file does not show up until 3 mins after the user logon.  

    Please advise where I should check. 

    Thanks. 
    Wednesday, August 31, 2016 2:37 AM

Answers

  • Hi,

    Thanks for your post.

    The issue seems to be caused by a delay in initializing network and locating domain controllers. Enabling "Always wait for the network at computer startupand logon" via group policy should resolve it as we need to give system more time to initiate network before proceeding with the logon process.

    We could also enable "
    startupPolicy Processing Wait Time" and setting wait time to an appropriate value to let the GPOs working with minimal boot delays. We could know the accurate policy processing time via the Group Policy Operational Log Event. Please refer to the following article to get more details:

    Optimizing Group Policy Performance

    https://technet.microsoft.com/en-us/magazine/2008.01.gpperf.aspx
    There are two ways to enable this option:

    Group Policy
    Computer Configuration > [Policies] > Administrative Templates > System >Group Policy > Startup Policy Processing Wait Time – Enable the option and set wait time to 10 - 60 seconds
    Note 1: This option is only supported by Windows Vista and later clients and may be not present on Server 2003 domain controllers
    Note 2: Group policy description tells that the default wait time is 30 seconds, which obviously raises the question how setting time-out to less than 30 seconds can fix the problem. It seems that default 30 seconds interval is not always used and Windows often employs its own algorithms to calculate the time-out (if it's not enforced by Group Policy or Registry)

    Registry
    On Client Computer:

    1. Start > Regedit.exe

    2. Navigate to  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

    3. Create New DWORD value with name GpNetworkStartTimeoutPolicyValue and set Value data (decimal) to the required timeout interval in seconds

    4. Restart the computer

    More articles for your reference:

    Understand the Effect of Fast Logon Optimization and Fast Startup on Group Policy

    https://technet.microsoft.com/en-us/library/jj573586.aspx

    Control How Group Policy Is Applied At Logon

    https://technet.microsoft.com/en-us/magazine/gg486839.aspx

    Best Regards,

    Alvin Wang


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, August 31, 2016 7:29 AM
    Moderator

All replies

  • Hi,

    Thanks for your post.

    The issue seems to be caused by a delay in initializing network and locating domain controllers. Enabling "Always wait for the network at computer startupand logon" via group policy should resolve it as we need to give system more time to initiate network before proceeding with the logon process.

    We could also enable "
    startupPolicy Processing Wait Time" and setting wait time to an appropriate value to let the GPOs working with minimal boot delays. We could know the accurate policy processing time via the Group Policy Operational Log Event. Please refer to the following article to get more details:

    Optimizing Group Policy Performance

    https://technet.microsoft.com/en-us/magazine/2008.01.gpperf.aspx
    There are two ways to enable this option:

    Group Policy
    Computer Configuration > [Policies] > Administrative Templates > System >Group Policy > Startup Policy Processing Wait Time – Enable the option and set wait time to 10 - 60 seconds
    Note 1: This option is only supported by Windows Vista and later clients and may be not present on Server 2003 domain controllers
    Note 2: Group policy description tells that the default wait time is 30 seconds, which obviously raises the question how setting time-out to less than 30 seconds can fix the problem. It seems that default 30 seconds interval is not always used and Windows often employs its own algorithms to calculate the time-out (if it's not enforced by Group Policy or Registry)

    Registry
    On Client Computer:

    1. Start > Regedit.exe

    2. Navigate to  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

    3. Create New DWORD value with name GpNetworkStartTimeoutPolicyValue and set Value data (decimal) to the required timeout interval in seconds

    4. Restart the computer

    More articles for your reference:

    Understand the Effect of Fast Logon Optimization and Fast Startup on Group Policy

    https://technet.microsoft.com/en-us/library/jj573586.aspx

    Control How Group Policy Is Applied At Logon

    https://technet.microsoft.com/en-us/magazine/gg486839.aspx

    Best Regards,

    Alvin Wang


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, August 31, 2016 7:29 AM
    Moderator
  • Hi,

    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    Best Regards,

    Alvin Wang


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, September 09, 2016 9:16 AM
    Moderator