Skip to main content
Solved

Install Google Drive via script


kwoodard
Forum|alt.badge.img+12

Is there an updated script to install Google Drive? I have been trying to deploy Google Drive via Self Service using the package installer. 9/10 times it fails, whereas installing Google Chrome with a script works every time. I would like to do this with Google Drive. I have seen a few scripts out there, but they are many years old.

Best answer by AJPinto

Jamfs Mac Apps has a policy for google drive. If that nor installomator are viable for you, I would suggest contacting google for their "evergreen" download URL for google drive so you can curl down the most current version and install it with a script.

View original
Did this topic help you find an answer to your question?

8 replies

Shyamsundar
Forum|alt.badge.img+13
  • Jamf Heroes
  • 283 replies
  • October 15, 2024

kwoodard
Forum|alt.badge.img+12
  • Author
  • Valued Contributor
  • 275 replies
  • October 15, 2024
Shyamsundar wrote:

I'm just looking for a script to install Google Drive. I am not looking to learn a whole new process. I might go down the Installomator road at some time in the future, but today is not that day. I do have it bookmarked though.


AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • 2710 replies
  • Answer
  • October 15, 2024

Jamfs Mac Apps has a policy for google drive. If that nor installomator are viable for you, I would suggest contacting google for their "evergreen" download URL for google drive so you can curl down the most current version and install it with a script.


kwoodard
Forum|alt.badge.img+12
  • Author
  • Valued Contributor
  • 275 replies
  • October 15, 2024
AJPinto wrote:

Jamfs Mac Apps has a policy for google drive. If that nor installomator are viable for you, I would suggest contacting google for their "evergreen" download URL for google drive so you can curl down the most current version and install it with a script.


I admit, I haven't tried using that option (Jamf Mac Apps) in a while. It used to always fail when users would install via Self Service. I will try that and see if it is working more consistently now.


YanW
Forum|alt.badge.img+11
  • Contributor
  • 180 replies
  • October 15, 2024

Forgot where I got this from. I don't use this myself, but it still works. 

#!/bin/zsh # make temp folder for downloads mkdir "/tmp/googledrive" # change working directory cd "/tmp/googledrive" #download Google Drive File Stream curl -L -o "/tmp/googledrive/GoogleDrive.dmg" "https://dl.google.com/drive-file-stream/GoogleDrive.dmg" # Mount the DMG hdiutil mount GoogleDrive.dmg # Get Volume Name Volume=$(diskutil info / | grep "Volume Name:" | awk '{print $3,$4,$5,$6}') # Install Google Drive sudo installer -pkg /Volumes/Install\\ Google\\ Drive/GoogleDrive.pkg -target / #Tidy Up hdiutil unmount "/Volumes/Install Google Drive" sudo rm -rf "/tmp/googledrive"

 


pete_c
Forum|alt.badge.img+16
  • Honored Contributor
  • 251 replies
  • October 16, 2024
kwoodard wrote:

I admit, I haven't tried using that option (Jamf Mac Apps) in a while. It used to always fail when users would install via Self Service. I will try that and see if it is working more consistently now.


I have a site that relies on Mac Apps for most of their productivity apps, including Chrome and Drive, and it works quite well - certainly less headache than rolling your own.


kwoodard
Forum|alt.badge.img+12
  • Author
  • Valued Contributor
  • 275 replies
  • October 16, 2024
AJPinto wrote:

Jamfs Mac Apps has a policy for google drive. If that nor installomator are viable for you, I would suggest contacting google for their "evergreen" download URL for google drive so you can curl down the most current version and install it with a script.


This appears to be working now. Thank you for the reminder.


Forum|alt.badge.img+3
  • New Contributor
  • 8 replies
  • October 17, 2024

Like what others said. But if you don't want to use Jamf Apps or Installomator, you can use this script that has been working for me for the past 2 years.

cd /tmp/ curl -Lo googledrive.dmg "https://dl.google.com/drive-file-stream/GoogleDrive.dmg" hdiutil mount googledrive.dmg sudo installer -pkg /Volumes/Install\\ Google\\ Drive/GoogleDrive.pkg -target /Applications hdiutil unmount /Volumes/Install\\ Google\\ Drive sudo rm -rf /tmp/googledrive.dmg exit

 


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