Dialog with jamfhelper is closed when enrollment is complete.

Yamashiro
New Contributor III

Hello All,
At the end of the policy to be executed at enrollment, I display a dialog using jamfhelper in the background.
However, there is a phenomenon that the dialog is closed arbitrarily.

Is there a way to display the dialog in the background without closing the dialog in the policy executed at enrollment?

Supplement) When the applicable policy is executed from Self Service, a dialog is displayed in the background

The script displaying the dialog is below.

#!/bin/sh
JAMF_HELPER="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"
JAMF_ICONS_PATH="/Applications/Self Service.app/Contents/Resources/AppIcon.icns"
DIALOG_HEADING="Title"
DIALOG_DESCRIPTION="message"

"$JAMF_HELPER" -windowType utility -heading "$DIALOG_HEADING" -alignHeading center -button1 "OK"  -defaultButton 1 -icon "$JAMF_ICONS_PATH" -description "$DIALOG_DESCRIPTION" &
1 ACCEPTED SOLUTION

Yamashiro
New Contributor III

I was able to display a dialog at the end of the policy to be exected at enrollment, by doing the following.

#!/bin/sh
launchctl load dialog.plist

The contents of dialog.plist is here.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>dialog</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper</string>
        <string>-windowType</string>
        <string>utility</string>
        <string>-button1</string>
        <string>OK</string>
        <string>-defaultButton</string>
        <string>1</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

View solution in original post

1 REPLY 1

Yamashiro
New Contributor III

I was able to display a dialog at the end of the policy to be exected at enrollment, by doing the following.

#!/bin/sh
launchctl load dialog.plist

The contents of dialog.plist is here.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>dialog</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper</string>
        <string>-windowType</string>
        <string>utility</string>
        <string>-button1</string>
        <string>OK</string>
        <string>-defaultButton</string>
        <string>1</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

View solution in original post