Menu Close

Setup Your Mac (1.4.0) via swiftDialog

Update: 11-Jun-2024

Setup Your Mac (1.15.0) with SYM-Helper (1.2.0) via swiftDialog (2.5.0)


Significantly enhanced Completion Action options help to provide your users a seamless post-enrollment experience when setting up their new Macs

Setup Your Mac (1.4.0)

Introduction

Setup Your Mac aims to simplify initial device configuration by leveraging swiftDialog v2 (or later) and Jamf Pro Policy Custom Events to allow end-users to self-complete Mac setup post-enrollment via Jamf Pro’s Self Service.

Please see Setup Your Mac via swiftDialog (1.3.0) for detailed configuration instructions. (The remainder of this article focuses on changes introduced in version 1.4.0.)

Update

Setup Your Mac (1.5.0) is now available an introduces highly requested input fields to help provide your users a seamless post-enrollment experience when setting up their new Macs.

Completion Actions

In addition to the previous wait and sleep options, Setup Your Mac (1.4.0) introduces the following Completion Action options:

Log OutRestartShut Down
 User is forcibly logged outComputer is forcibly restartedComputer is forcibly shut down
AttendedUser is forcibly logged out, after interacting with Setup Your Mac dialogsComputer is forcibly restarted, after user interacts with Setup Your Mac dialogsComputer is forcibly shut down, after user interacts with Setup Your Mac dialogs
ConfirmUser is prompted to Log Out via the dismissible, built-in macOS dialog boxUser is prompted to Restart via the dismissible, built-in macOS dialog boxUser is prompted to Shut Down via the dismissible, built-in macOS dialog box

Dynamic Button Label & Progress Text

Additionally, the label for the default button, button1text, and the message below the progress bar, progresstext, are dynamically updated based on the specified Completion Action:

Setup Your Mac dialogFailure dialog
SuccessfulFailure
Shut DownShutting Down …Continue …Shut Down
Shut Down AttendedShut Down
Shut Down Confirm
RestartRestarting …Restart
Restart AttendedRestart
Restart Confirm
Log OutLogging Out …Log Out
Log Out AttendedLog Out
Log Out Confirm

(Thanks for the thorough testing and suggestions, @Andrew!)

Debug Mode

Setup Your Mac (1.4.0) includes the following enhancements when using Debug Mode:

  • DEBUG MODE now only displayed as infotext (i.e., bottom, left-hand corner)
  • Dynamically replaces blurscreen with moveable for easier interaction with dialogs, Terminal and Console
  • General performance increases
  • Completion Actions are informational-only in Debug Mode (i.e., specifying a Completion Action of Restart Attended will only display a dialog, not actually restart the computer)

General Improvements

The 1.4.0 release includes the following general improvements

  • Replaced “Installing …” with “Updating …” for recon-flavored trigger
  • Changed “Updating Inventory” to “Computer Inventory” for recon-flavored listitem
  • Changed exit code to 1 when user quits “Welcome” screen
  • Changed welcomeIcon URLs
  • Removed jamfDisplayMessage function and reverted dialogCheck function to use osascript (with an enhanced error message)

Script

Latest version is available on GitHub.

Parameter Label

Use the following for the label of Parameter 6 (see Configuration, Step D.):

Completion Action [ wait (default) | sleep (with seconds) | Shut Down | Shut Down Attended | Shut Down Confirm | Restart | Restart Attended | Restart Confirm | Log Out | Log Out Attended | Log Out Confirm ]

Testing Tips

While Debug Mode can prove helpful during initial testing, eventually you’ll want to test-drive real-world scenarios (and, as you can imagine, testing forced-restarts includes some inherent inconvenience).

A trick I stumbled on is to first launch Terminal and elevate to root before beginning your tests. With an elevated Terminal, you’ll first be prompted for confirmation to forcibly quit Terminal, which you can cancel to continue your testing.

Posted in Device Management, Jamf Pro, macOS, Scripts, Tips & Tricks

Related Posts