silent install Box Tools

tranatisoc
New Contributor II

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

15 REPLIES 15

allanp81
Valued Contributor

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

tranatisoc
New Contributor II

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

jimderlatka
Contributor

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

AdminIA
New Contributor III

@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?

MagicMick
Contributor

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.

AdminIA
New Contributor III

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.

rgranholm
Contributor

@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 ~/

AdminIA
New Contributor III

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

rgranholm
Contributor

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?

rgranholm
Contributor

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.)

rgranholm
Contributor

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?

AdminIA
New Contributor III

@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

geoffreykobrien
Contributor

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

rgranholm
Contributor

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

damienbarrett
Valued Contributor

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.