Jamfhelper -startlaunchd on modern macOS?

alexjdale
Valued Contributor III

Does this option do anything anymore? I was hoping to be able to spin off a jamfhelper dialog so I could continue with a script in the background (and kill it later), but it doesn't seem to do anything (or I'm missing something). Is this option essentially useless these days?

I'm trying to remove cocoadialog from my scripts and use jamfhelper as much as possible, but this is a sticking point for me for some actions.

2 REPLIES 2

crbeck
Contributor

It appears -startlaunchd does nothing but produce some errors. What do you need -startlaunchd for?

If you need to take over the login window, I've used this in the past. User runs something from Self Service notifying them their Mac is going to reboot, Mac reboots, gets to login window and immediately jamf helper takes over the entire screen. Script does its thing, then deletes the LaunchAgent and either kills the jamf helper process or reboots again.

cat << EOF > /Library/LaunchAgents/org.yourorg.loginJamfHelper.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>org.yourorg.loginJamfHelper</string>
    <key>RunAtLoad</key>
    <true/>
    <key>LimitLoadToSessionType</key>
    <string>LoginWindow</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper</string>
        <string>-windowType</string>
        <string>fs</string>
        <string>-heading</string>
        <string>"$heading"</string>
        <string>-title</string>
        <string>"$title"</string>
        <string>-description</string>
        <string>"$description"</string>
        <string>-icon</string>
        <string>"$icon"</string>
    </array>
</dict>
</plist>
EOF

alexjdale
Valued Contributor III

Actually, what I want to do is simply pop up a dialog to let users know I'm doing something. For example, while I'm installing software updates, I would want the user to know it's happening and not to interrupt.

To that end, I wanted to pop a jamfhelper dialog box, install updates, and then kill the dialog after the updates are done. I can do it with a launchdaemon (load it when I start, unload it when I'm done) but it's annoying and overly complicated. It sounded like this was built into jamfhelper with -startlaunchd and -kill.