Google Drive - Deployment

irod87
New Contributor

I'm wanting to deploy the Google Drive application to about 100 macbook pro's running 10.6.8. I created the before and after snapshot and turned it into a .pkg. It deploys but I have 2 things that I would like to try and work out. It asks for admin credentials to install the finder integration and second is after every logoff and login of the user Google Drive starts automatically but it asks for admin permission to update. Is there any way to get those 2 things 'fixed'?

Thanks

16 REPLIES 16

stevewood
Honored Contributor II

@irod87 I've had success deploying Drive by packaging up the Google Drive app from /Applications and the Google Drive Icon Helper from /Library/PrivilegedHelperTools.

I just tested this again by packaging up the latest version (1.19.8406) and deploying in a VM. I was able to run the package, open Drive, sign in, and did not receive any admin prompts at all.

irod87
New Contributor

@stevewood sounds like that's what I need to do. Is this done with Composer?

bentoms
Honored Contributor III
Honored Contributor III

@irod87, if you open composer & click cancel to the drown down window, you can drag the files that @stevewood mentioned to the "Sources" part of the window.

You can then make a DMG/PKG from that.

irod87
New Contributor

Thanks I'll give it a try on Monday.

roadrunner2348
Contributor

I've been using the same method, and it works well, just a side note, make sure that you set the permissions correctly on the Google Drive App. Most of the time when I do an import it sets the owner to my account.

irod87
New Contributor

I tried this today but was unable to locate the Google Drive Icon Helper from /Library/PrivilegedHelperTools. I checked 3 different computers with Drive installed and the only thing in that location is a file related to Microsoft Office.

stevewood
Honored Contributor II

@irod87 on all of the machines you checked, were users logged into Google Drive? I don't think the helper icon installs until the first time a user logs in.

irod87
New Contributor

@stevewood Yes, Im on my macbook pro currently and logged in as me in my Drive app. I also checked my iMac also signed in as me. Both of these running Yosemite. The computer I was trying to build on is running mountain lion. No user was signed in at time of creation attempt.

bcourtade
New Contributor III

I'm using the Google Drive pkg from the cgerke-recipes repository for Autopkg. Works without any admin popups. It doesn't automatically launch Google Drive for a new user login though, it needs to be run from the Applications folder once then it will open automatically at logon.

bpavlov
Honored Contributor

Sorry to bring up an old thread, but I am trying to reproduce this but can't. If I install Google Drive.app only on a computer on a standard user account, I do not get any admin prompts after running Google Drive. It syncs just fine. Maybe it's no longer an issue on newer versions of Google Drive. I'm on version 1.23.9648.8824 for what its worth.

pestacio
New Contributor

Re: Roadrunners comment regarding file permissions, What permissions do you recommend?

stwrz
New Contributor

It'd be glorious if we had a script that would either install or update Drive. The one someone made for Chrome works wonderfully.

peterlbk
Contributor

@stwrz Hi, this one installs Google Drive, but there's no version check built in. Maybe I'll look into that later on.
This script downloads google drive, then opens the app and prompts a user to log on.

I hope this helps...

#!/bin/sh -x
logfile="/Library/Logs/jss.log"
user=`ls -l /dev/console | cut -d " " -f 4`
PRODUCT="Google Drive"
#  installation

    /bin/echo "`date`: Installing Google Drive for $user..."  >> ${logfile}
    dmgfile="image.dmg"
    volname="Install Google Drive"
    url="https://dl.google.com/drive/installgoogledrive.dmg"
    /bin/echo "`date`: Downloading $PRODUCT." >> ${logfile}
    /usr/bin/curl -k -o /tmp/image.dmg $url
    /bin/echo "`date`: Mounting installer disk image." >> ${logfile}
    /usr/bin/hdiutil attach /tmp/image.dmg -nobrowse -quiet
    /bin/echo "`date`: Installing..." >> ${logfile}
    cp -R /Volumes/Install Google Drive/Google Drive.app /Applications/
    /bin/sleep 3
    /bin/echo "`date`: Unmounting installer disk image." >> ${logfile}
    /usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep ${volname} | awk '{print $1}') -quiet
    /bin/sleep 3
    open -a /Applications/Google Drive.app/

landonletzkus
New Contributor II

Hey @stwrz -- just curious as to which script you're referring to for updating Chrome? There's a few floating around out there and I'm trying to figure out which one to use. Many Thanks!!

stevenjklein
Contributor II

@peterloobuyck : I tried your script. It successfully installs Google Drive, but Jamf reports that it failed.

It seems to be a problem with this line;

 /usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep ${volname} | awk '{print $1}') -quiet

Here are the relevant lines from the log:

++ /bin/df
++ /usr/bin/grep Install Google Drive
++ awk '{print $1}'
grep: Google: No such file or directory
grep: Drive: No such file or directory
+ /usr/bin/hdiutil detach -quiet
+ /bin/sleep 3
+ open -a '/Applications/Google Drive.app/'
LSOpenURLsWithRole() failed for the application /Applications/Google Drive.app with error -10810.

Any suggestions?

bpavlov
Honored Contributor
/usr/bin/grep "Install Google Drive"

Looks like that's the line causing you trouble. Use quotes so that it can interpret spaces.