Wednesday, January 2, 2013

In what order are logon scripts executed?


There are a number of places to configure a script to run at logon. This mainly applies when logon scripts are configured to run synchronously.
  1. Scripts configured via Group Policy run first (in order of precedence)
    User Configuration\Windows Settings\Scripts (Logon/Logoff)
  2. Scripts configured via the UserInit value in the registry run second
    (HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit)
  3. Scripts configured via the AppSetup value in the registry run third
    (HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AppSetup)
  4. Scripts configured via user properties run fourth (Profile tab on the user's AD object)
  5. Scripts configured via the Run key in the registry run last
    (HKLM\Software\Microsoft\Windows\CurrentVersion\Run)