Skip to main content

Hi - so the box tools (or box edit) is a .dmg file. the only way i know how to silent install is a .pkg format (installer command).



1st step via composer is to convert the dmg to pkg
then package it via casper admin.
then push out as a policy



i get what looks like a confirmation that it installed successfully:



Verifying package integrity...
Installing BoxToolsInstaller.pkg...
Successfully installed BoxToolsInstaller.pkg.



but it's not working. box tools is not installed.



please help. thanks

How are you checking if it's installed? It seems to install to the individual user in my experience, so ~/Library/Application Support/Box


the box edit folder and app will show up in ~/Library/Application Support/Box/Box Edit


also make sure you download the box tools admin installer. its a pkg and just installs as system instead installing as user.


@jimderlatka I have an open ticket with Box on this issue. Their "silent installer" admin installer .pkg errors. for me on Catalina. It errors with "Must be run as root to install this package" ... but the Jamf process is root, so there's that. Also, manually running their install command either sudo or not fails. Jim, can you share a little more on what you do to get this to work?


Same boat. Funny enough the 'user installer' doesn't require Admin privs, so users can install it themselves without hassle. Just package the installer app.


Here's an update on this. It turns out that their documentation is wrong.



Their instructions (here) are to deploy the pkg locally, then run an installer script. But their script...



currentUser=`/bin/ls -la /dev/console | /usr/bin/awk '{print$3}'`
sudo -u ${currentUser} installer -pkg <shared_folder>/BoxToolsInstaller.pkg -target $HOME


... has "$HOME" as the target, and that makes it barf. Instead, you need to replace that with "CurrentUserHomeDirectory"...



currentUser=`/bin/ls -la /dev/console | /usr/bin/awk '{print$3}'`
sudo -u ${currentUser} installer -pkg <shared_folder>/BoxToolsInstaller.pkg -target CurrentUserHomeDirectory


... and it installs into the user directory as desired.


@AdminIA thanks for this! It looks like they corrected their documentation.



Also, wouldn't CurrentUserHomeDirectory just look like this? ... or is there some variable I am not seeing and you actually need to leave it as CurrentUserHomeDirectory



-target ~/

@rgranholm I think that would assume root's home directory, as it is running as root. Right?


Ah you are correct, so does it need some other variable or will CurrentUserHomeDirectory actually work? I tried simply running the command like this and it failed...



sudo installer -pkg /Users/Shared/Insigniam/Resources/BoxToolsInstaller.pkg -target CurrentUserHomeDirectory
installer: Package name is Box Tools
installer: Installing at base path /var/root
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An unexpected error occurred while moving files to the final destination.)


Do you have this working, mind sharing your policy or script?


JAMF doesn't fair much better running on a user machine...



Successfully installed Install BoxToolsInstaller 2020-12-18.pkg.
Running command currentUser=`/bin/ls -la /dev/console | /usr/bin/awk '{print$3}'`;sudo -u ${currentUser} installer -pkg /Users/Shared/Insigniam/Resources/BoxToolsInstaller.pkg -target CurrentUserHomeDirectory...
Result of command:
installer: Package name is Box Tools
installer: Installing at base path /Users/jmullican
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)

Okay, now I'm baffled. The same policy runs fine on my machine, but fails on 5 other users machines, all other users. Is there a known working/not working OS? or log I can pull more info from for installers?


@rgranholm This is what I have working. It sucks, because It is not a "silent install" I can push to machines. I have to set it up as a Self Service item, and ask users to run it (sigh). It skips Box's instructions entirely, and does a curl to download the latest .dmg, mounts it, then runs the installer, then tries to remove the .dmg when it is finished. I still don't have a true silent install oprion that works. I've gone around with Box support for weeks, and gotten tired for working on it. I'd LOVE to hear about a real solution finally...



#!/bin/sh
curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Safari/605.1.15" -L https://e3.boxcdn.net/box-installers/boxedit/mac/currentrelease/BoxToolsInstaller.dmg > /Users/Shared/BoxToolsInstaller.dmg
hdiutil attach /Users/Shared/BoxToolsInstaller.dmg
open -g "/Volumes/Box Tools Installer/Install Box Tools.app"
hdiutil detach /Volumes/Box Tools Installer/
rm -rf /Users/Shared/BoxToolsInstaller.dmg
exit 0

https://support.box.com/hc/en-us/articles/360043695834-Large-Scale-Deployments-Box-Tools


@geoffreykobrien ... has there been any significant change to that? last i attempted those instructions they didn't work - are you successfully using them?


I'm seeing the same silent install errors when I try to run the Box Tools installer as part of a policy to install during enrollment. But when I manually run the *very same installer* by double-clicking the .pkg, it installs without a problem. I'm following the instructions from Box.com linked above. The target is CurrentUserHomeDirectory, not $Home.

This is ridiculous. Box is a huge company in the Enterprise. How can they not have a silent install option that works? I shouldn't have to direct my users to Self Service to install this software.


I'm seeing the same silent install errors when I try to run the Box Tools installer as part of a policy to install during enrollment. But when I manually run the *very same installer* by double-clicking the .pkg, it installs without a problem. I'm following the instructions from Box.com linked above. The target is CurrentUserHomeDirectory, not $Home.

This is ridiculous. Box is a huge company in the Enterprise. How can they not have a silent install option that works? I shouldn't have to direct my users to Self Service to install this software.


Thank you Damien. We are seeing the same here. Install success if the Box Tools .pkg is run from double-click, but failed if installed via MDM, even with their provided install scripting.

Also worth noting that the install will fail if it is already installed. For testing you would need to uninstall Box Tools in order to properly test another install.

Here is our current script:

 

# Instructions from: https://support.box.com/hc/en-us/articles/360043695834-Large-Scale-Deployments-Box-Tools

currentUser=`/bin/ls -la /dev/console | /usr/bin/awk '{print$3}'`

# Changes into the Users Shared folder
# /tmp and /usr/local/bin have permissions issues with Mosyle, not all can read from there
cd /Users/Shared

#Download the Box Tools PKG to /Users/Shared
sudo -u ${currentUser} curl -L --silent -o /Users/Shared/BoxTools.pkg "https://box-installers.s3.amazonaws.com/boxedit/mac/currentrelease/BoxToolsInstaller.pkg"

# Installs the package
sudo -u ${currentUser} installer -pkg /Users/Shared/BoxTools.pkg -target CurrentUserHomeDirectory

# Removes the package after installation
rm -f /Users/Shared/BoxTools.pkg

 


I finally ended up doing a similar workaround. However, our company has jettisoned Box so now I don't have to support it anymore. Ta!


I managed to deploy the "admin installer (.pkg)" via MDM (BCM and Intune) successfully by using the following command line instead of the one provided in their documentation:

 

sudo installer -pkg /shared/folder/BoxToolsInstaller.pkg -target /

 

You'll notice I ditched the "currentUser" and "CurrentUserHomeDirectory" variables entirely, which makes it get installed under "/Library/Application Support/Box/Box Edit". However, it works perfectly fine this way, since the user temp files still get created under the user's "~/Library/Application Support/Box/Box Edit" folder whenever they open a file from the browser.

 

Hope this helps someone!

Eduardo


I managed to deploy the "admin installer (.pkg)" via MDM (BCM and Intune) successfully by using the following command line instead of the one provided in their documentation:

 

sudo installer -pkg /shared/folder/BoxToolsInstaller.pkg -target /

 

You'll notice I ditched the "currentUser" and "CurrentUserHomeDirectory" variables entirely, which makes it get installed under "/Library/Application Support/Box/Box Edit". However, it works perfectly fine this way, since the user temp files still get created under the user's "~/Library/Application Support/Box/Box Edit" folder whenever they open a file from the browser.

 

Hope this helps someone!

Eduardo


Update: It looks like Box fixed the BoxToolsInstaller.pkg installer package because now it's installing correctly under the user's ~/Library/Application Support/Box/Box Edit/ folder without issues with the installation line in the documentation: 

sudo -u ${currentUser} installer -pkg BoxToolsInstaller.pkg -target CurrentUserHomeDirectory

 


Reply