Skip to main content

Does anyone know what plist controls Zoom to auto-boot at login?  It seems like it may be more of an Apple plist than Zoom.




 

You just need a launch agent to run the application at login. Its just a plist you shove in /Library/LaunchAgents. I dont have one handy for zoom, but this is the one for Jamf Connect so you can have an idea of what it looks like. The run at load is the important part.


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.jamf.connect</string>
<key>LimitLoadToSessionType</key>
<array>
<string>Aqua</string>
</array>
<key>Program</key>
<string>/Applications/Jamf Connect.app/Contents/MacOS/Jamf Connect</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

 


@jschank I haven't made use of this in a while, but here's a script that would add and delete items to that list if you want to see if it's still functional:


#!/bin/bash

# Utility-LoginItemsAddDelete.bash - adds or deletes an item to the Login Items list
# Adapted from https://www.jamf.com/jamf-nation/discussions/28881/login-items#responseChild169823
#
# Set up to be run from a Jamf Pro policy
# Parameters:
# $4 - "add" to add an item, "delete" to delete an item
# $5 - Path to application to be added
# $6 - "true" to set the Hidden flag for the item being added, "false" to leave unset
# $7 - "true" to launch the app being added if it's not already running

# Task="add"
# App_Path="/Applications/Microsoft Teams.app"
# Hidden="false"
# LaunchApp=true"
Task="$4"
App_Path="$5"
Hidden="$6"
LaunchApp="$7"

Item=$(basename "$App_Path")
Label=$(basename "$App_Path" | awk -F "." '{print $1}')

App_Running=$(pgrep -fl "$Label" | grep "$App_Path/Contents" | grep -v "grep")
Existing_Items=( $(/usr/bin/osascript -e 'tell application "System Events" to get the name of every login item' ))
Already_Exists=$(echo "${Existing_Items[@]}" | grep "$Label")

# Verify input
if [ -z "$App_Path" ] || [ -z "$Task" ]; then
echo "Required variable is undefined!"
exit 0;
fi

if [ "$Task" == "add" ]; then
if [ -z "$Already_Exists" ]; then
/usr/bin/osascript <<EOF
tell application "System Events" to make login item at end with properties {Path:"$App_Path", name:"$Item", hidden:$Hidden}
EOF
fi

# If adding an app, launch it if it's not already running
if [ -z "${App_Running}" ] && [ "$LaunchApp" == "true" ]; then
open -a "${App_Path}" > /dev/null 2>&1
fi
elif [ "$Task" == "delete" ]; then
if [ -n "$Already_Exists" ]; then
/usr/bin/osascript <<EOF
tell application "System Events" to delete login item "$Label"
EOF
fi
fi

exit 0

 Yes you could use a LaunchAgent instead but that's not extremely discoverable (which may or may not be useful to you)


May also want to look at this documentation for a potential Profile.


https://support.zoom.com/hc/en/article?id=zm_kb&sysparm_article=KB0064957


Reply