Enforce an application to always run on MacOS

This article explains 2 different methods in order to keep an Application running on MacOS

Script Code:

#!/bin/bash

application_name=”Notes”

osascript -e “do shell script \”

  if ! (ps aux | grep $application_name | grep -v grep > /dev/null)

  then

      Open -a $application_name

  fi

\” with administrator privileges”

 

Custom Attribute Method (Device need to be online):

Steps:

  1. Profile configuration
    1. Add Profile under MacOS > Device > custom attributes
  • Assign the profile to user.
  • Testing

Script Method (Require the new Script feature Freestyle)

Prerequisite

  • Intelligent Hub 20.10
  • Workflow Engine Application 20.10
    • The VMware Workspace ONE Workflow Engine 20.10 for macOS is an additional component required to support some new functionality, such as Scripts and Freestyle Orchestrator workflows.

Steps:

  1. App deployment
    1. Add Workflow Engine Application 20.10 to UEM internal Apps and deploy to MacOS devices
  • Script configuration
    • Add Bash scripts and execute as system
  • Script assignment
    • Assign the script to corresponding user with proper deployment methods
      • Script can run every 4/6/8/12/24 hours
  • Testing

-Special credit to Bolun for his support on getting this working-

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: