disable self service from launching at reboot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 05-03-2017 11:28 AM
hi all -
we have a self service (SS) policy that users click, does some action and restart immediately...this policy works fine. except after user logs back in, self service auto relaunch.
this may be a feature by design (not sure)....but is there an option to prevent SS relaunch after the reboot?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 05-03-2017 12:04 PM
The reason that happens is because the reboot is happening in a non graceful manner, i.e. apps are not being quit normally before the reboot, so the OS is relaunching any apps that were open when it force restarted the Mac. The OS stores these open apps in the users ByHost com.apple.loginwindow plist file in an array called "TALAppsToRelaunchAtLogin"
I don't know if there's a preferred Apple-y method to stop this, but in the past I would have a script delete the contents of that TALAppsToRelaunchAtLogin
array at the completion of the policy before the reboot. Upon login, no apps would auto relaunch. Keep in mind it's more than just Self Service that will auto launch after login when this happens. If they have other apps open at the time, they will open up again too.
As far as my testing back at the time was concerned, removing that array had no effect on apps they specified should be launched at login, like ones added to the Login Items tab under their account. Those are stored elsewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 05-03-2017 12:28 PM
hi mm2270 - thanks for the quick reply.
please could you assist me with the command or script to delete the contents of that TALAppsToRelaunchAtLogin array?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 05-03-2017 12:31 PM
The default options in macOS is to re-open any application that was open when you logged out, this includes Self Service.
If the user has un-checked that box during logout then even Self Service should not re-open.
The fix that mm2270 list would also work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 05-03-2017 12:38 PM
actually strider.knh, even when user unchecked/unselect that relogin settings, SS would still always relaunch.
looking forward to mm2270 method to delete this array

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 05-03-2017 12:39 PM
Sure, here is what I found in one of my scripts. I have not used this in a while now, so I can't say if it still works as is under Sierra for example. I would think it should still work, but give it a try and see.
#!/bin/sh
## Get the logged in user
loggedInUser=$(stat -f%Su /dev/console)
## Get the Mac's UUID string
UUID=$(ioreg -rd1 -c IOPlatformExpertDevice | awk -F'"' '/IOPlatformUUID/{print $4}')
## Delete the plist array
/usr/libexec/PlistBuddy -c 'Delete :TALAppsToRelaunchAtLogin' /Users/${loggedInUser}/Library/Preferences/ByHost/com.apple.loginwindow.${UUID}.plist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 05-04-2017 05:15 AM
hi mm2270, it's working with sierra.
many thanks for your assistance!
all the best!
