Skip to main content
Question

How to uninstall BOX drive using script

  • September 21, 2021
  • 5 replies
  • 8 views

Forum|alt.badge.img+2
I have tried below one but isn't working, Any ideas?

logged_in_user=
$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name 😕😕 && ! /loginwindow/ { print $3 }' )
appname="Box"
testDirectory="/Applications/${appname}.app"
if [ -d "${testDirectory}" ]; then
echo "${appname} is installed; quit if running ..."
     if [[ $(ps axc | grep "$appname") != "" ]]; then
     echo "Box running, Quitting ..."
     sudo /usr/bin/osascript -e 'quit app "'"${appname}"'"'
     sudo pkill $appname
     else
     echo "Box not running, exiting..."
     fi
sudo -u $logged_in_user /Library/Application\\ Support/Box/uninstall_box_drive
fi

5 replies

Forum|alt.badge.img+13
  • Honored Contributor
  • 365 replies
  • September 21, 2021

Does the Box uninstaller not work? 

/Library/Application Support/Box/Uninstaller

Forum|alt.badge.img+2
andrew_nicholas wrote:

Does the Box uninstaller not work? 

/Library/Application Support/Box/Uninstaller

Thanks for your response Andrew.
Have been tried and it's not working.


geoff_widdowson
Forum|alt.badge.img+8
user-rTlVHZuwJV wrote:

Thanks for your response Andrew.
Have been tried and it's not working.


Here is my working policy

 


Forum|alt.badge.img+8
  • Contributor
  • 20 replies
  • November 16, 2021
geoff_widdowson wrote:

Here is my working policy

 


Thanks @geoff_widdowson! In my initial testing I didn't include the kill process for Box. But not only that, I was running

/Library/Application\\ Support/Box/uninstall_box_drive (without the _r) (just as the Box article states) as a policy command, and it kept erroring out mentioning not to use Sudo. I wasn't entering sudo in the command at all. Anyways, your process seemed to have uninstalled Box, and so thanks for your help. 


AVmcclint
Forum|alt.badge.img+21
  • Esteemed Contributor
  • 1043 replies
  • April 13, 2022
geoff_widdowson wrote:

Here is my working policy

 


Your policy didn't work for me (as of version 2.26.330). It still kept saying not to run it with sudo. I ended up removing the "Search for Process" entry and the "kill process if found". I used this in the Command box:

killall Box ; /Library/Application\\ Support/Box/uninstall_box_drive_r

and that worked.

What is the difference between the 3 different uninstall tools in AppSupport/Box/?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings