I would like to add applications to a users Login Items. But I do not want to add them using Configuration Profiles, as this means the user is unable to remove these applications from Login Items.
I want to add them just so that they start up when the user boots the mac or logs in. But if the user doesn't want this, they should be free to remove them again.
This used to be possible via Apple Script:
App_Path="$4"
App_Name="$5"
Hidden="$6"
/usr/bin/osascript <<EOF
tell application "System Events" to make login item at end with properties {Path:"$App_Path", name:"$App_Name", hidden:$Hidden}
EOF
but it seems this doesn't work anymore.
Does anyone have a way to do this?