Tuesday, August 12, 2014

Google Drive Sync as a Windows 2008 Service

We have a few Chromebooks being used by staff throughout the District.  We also use Windows shares heavily for access to shared files.

Access to Windows shares is not possible, but access to Google Drive shares is.  And Google offers a product called Google Drive Sync that will put files from a computer in Google Drive and keep them synced.

Now enter an awesome post: http://superuser.com/questions/463801/sync-google-drive-when-not-logged-in
Specifically the post from Reece Dodds.

That post is perfect, except for the registry information, but I missed the create subkey Parameters part, so I want to just make sure that everyone has an exact step by step guide.

  1. Log into the server with the account that you want to run the service as.
  2. Disable Internet EIC through Server Manager -> Configure IE ESC under the Security Information section on the main page.
  3. Setup Google Drive Sync. Configure google drive to not run at startup and exit the application.
    https://tools.google.com/dlpage/drive
  4. Download srvany.exe from Microsoft Windows 2003 Resource Kit. Copy srvany.exe into the folder where google drive is installed.
    http://www.microsoft.com/en-us/download/details.aspx?id=17657
  5. Open a windows cmd prompt (run as administrator) and type in the service and authentication details you want (in our case GoogleDriveSync) i.e. sc create GoogleDriveSync displayName= "Google Drive Service" start= auto obj= "administrator@potlatchschools.org" password= "<password>" binPath= "C:\Program Files (x86)\Google\Drive\srvany.exe"
  6. Goto your Start Menu, type in regedit32 and goto the new service (in this case GoogleDriveSync) HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\GoogleDriveSync
  7. Create subkey Parameters below which you must create two string values:
    1. Create a String Value called Application then right click on this and add the path to googledrivesync.exe (e.g C:\Program Files (x86)\Google\Drive\googledrivesync.exe)
    2. Create a String Value called AppParameters with the relevant parameters for googledrivesync.exe (e.g /autostart --noshow_confirmation_dialog_on_delete)
  8. From the command prompt run net start GoogleDriveSync or start the service via the services snap-in

You can then manage Google drive as a service. If you need to edit the settings within drive log in as the account that the service is running under, stop the service then start Google drive from the icon in the start menu. When you have completed the changes to the settings close the google drive desktop application and start the service back up again.