We want to install an app in a user’s Application folder and not the system-wide app folder. At the moment, with the Install Application action on Mac, the target drive is the system app folder. If I could provide the target path folder, that would be great!
We can make that happen @Kent0n; you could move the app to the current users’ application directory. Here is a script to do that:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
#!/bin/bash # Application name as parameter APP_NAME="$1" # System app directory SYSTEM_APP_DIR="/Applications" # Current User CURRENT_USER=`stat -f%Su /dev/console` # Home folder of current user HOME_FOLDER=$(dscl . -read /Users/"$CURRENT_USER" NFSHomeDirectory | cut -d: -f2 | xargs) # Current user application directory USER_APP_DIR="$HOME_FOLDER/Applications" # Create if user has no Application folder if [ ! -d "$USER_APP_DIR" ]; then /bin/mkdir "$USER_APP_DIR" /bin/chmod 755 "$USER_APP_DIR" /usr/sbin/chown "$CURRENT_USER" "$USER_APP_DIR" else if [ -d "$USER_APP_DIR/$APP_NAME" ]; then echo "App already exists in user's Applications folder" exit 0 fi fi # Copy from system folder to user folder /bin/cp -R "$SYSTEM_APP_DIR/$APP_NAME" "$USER_APP_DIR" # Move from system folder to user folder # /bin/mv "$SYSTEM_APP_DIR/$APP_NAME" "$USER_APP_DIR/$APP_NAME" exit 0 |
You just have to provide the app name as a parameter. For example, Book.app
Note, that you may experience issues with the working of the app when you move it from a system-wide folder to a user-based folder.
Hope this helps
Ciao!
9 August 2022