LoginWindowScripts | Apple Developer Documentation Archived: 2026-04-29 07:26:34 UTC Device Management LoginWindowScripts Device Management Profile The payload that configures scripts to run at login and logout. macOS 10.7+Device Assignment ServicesVPP License Management object LoginWindowScripts Properties loginscripts An array of one or more dictionaries of scripts to run at user login time. logoutscripts An array of one or more dictionaries of scripts to run at user logout time. skipLoginHook boolean If true , the system doesn’t execute the login scripts during login. Default: false skipLogoutHook boolean If true , the system doesn’t execute the logout scripts during logout. Default: false Discussion Specify com.apple.mcxloginscripts as the payload type. The MCX login and logout managed-scripts payload contains information about executable scripts that can run at user login and logout. To use this payload, set EnableMCXLoginScripts to true in https://developer.apple.com/documentation/devicemanagement/loginwindowscripts Page 1 of 3 /var/root/Library/Preferences/com.apple.loginwindow.plist ; otherwise, the system ignores this payload. Loginwindow uses the LoginHook and LogoutHook string keys in /var/root/Library/Preferences/com.apple .loginwindow.plist to indicate a path to the executable script files, which run during user login and logout. The system passes the current user name as an argument to the file. Profile availability Device channel macOS User channel NA Allow manual install macOS Requires supervision NA Requires user-approved MDM NA Allowed in user enrollment NA Allow multiple payloads NA Profile example PayloadContent loginscripts filedata ExampleD filename ping.sh https://developer.apple.com/documentation/devicemanagement/loginwindowscripts Page 2 of 3 skipLoginHookskipLogoutHookPayloadIdentifiercom.example.myloginwindowscriptspayloadPayloadTypecom.apple.mcxloginscriptsPayloadUUID2bcd5563-f44d-4f74-b706-050a628c0cafPayloadVersion1PayloadDisplayNameLogin Window ScriptsPayloadIdentifiercom.example.myprofilePayloadTypeConfigurationPayloadUUID5cbf617d-16a5-4564-ba2c-728fd7f7d732PayloadVersion1 Current page is LoginWindowScripts Source: https://developer.apple.com/documentation/devicemanagement/loginwindowscripts https://developer.apple.com/documentation/devicemanagement/loginwindowscripts Page 3 of 3