Category Filter

Script to Open Apps on Mac

To open an application on their system, users will have to find the app and double click on the app icon. With shell scripts, you need not know or navigate to the location of the app on the system, you can simply specify the app name or identifier to open the app. Moreover, you can open multiple apps from a single line command. This method is not only quick but also an effective way to remotely launch applications on a Mac.

Device admins can remotely run scripts on Macs managed with Hexnode using the Execute Custom Script action.

Scripting Language – Bash

File extension – .sh

Disclaimer:


The Sample Scripts provided below are adapted from third-party Open-Source sites.

Open an app

The open command can be used to open a file, directory or URL. Some of the options supported with the open command in this respect are –

  • -a – specifies the name of the application to open.
    Example – open –a “App Store”
  • -b – specifies the bundle identifier of the application to open.
    Example – open –b com.apple.AppStore
Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.