I have installed Google Drive on Windows Server 2008 R2. When I login to the server, Google Drive starts automatically and synchrnoizes files, pulling changes down from the cloud. All good so far.

However, I would like the sync to run even if I am not logged in. Is there any way to start the sync process automatically, maybe as a scheduled task?

I have other jobs on the server which distribute the files by FTP so I would like the server copies of the files to be up to date.

5 Answers 5


Have you tried the Task Scheduler?


From above:

Google Drive will only sync your files automatically when you are logged in to your account on Windows. If you want Google Drive to start even before you are logged in to your account, you can add it to Task Scheduler.

  1. On Windows 7, go to Start > All Programs > Accessories > System Tools > Task Scheduler
  2. Click on Create Task…
  3. Under General Tab
  4. Name: Google Drive Sync
  5. Security options: Run whether user is logged on or not
  6. Under Triggers Tab
  7. Click ‘New…’ button
  8. Begin the task: At startup
  9. Click ‘OK’ button
  10. Under Actions Tab
  11. Click ‘New…’ button
  12. Click ‘Browse…’ button
  13. Locate googledrivesync.exe (By default it is under C:\Program Files (x86)\Google\Drive)
  14. Click ‘OK’ button
  15. Under Settings Tab
  16. Uncheck ‘Stop the task if it runs longer …’
  17. Click ‘OK’ button to save the task
  • 1
    Nice first post. Link seems helpful. what does njr101 say?
    – nixda
    Dec 29, 2012 at 9:06
  • Looks like link is broken
    – njr101
    Jan 31, 2014 at 21:23
  • 1
    I tried this on Windows 8, but no luck - when I run the scheduled task, googledrivesync.exe flashes for a moment and quits without syncing the folder. No errors in logs and the task itself still has Running status. Jun 25, 2014 at 20:13
  • Windows 7 possibly worked with this answer in 2012, but I cannot get it to work with Windows 7 yet in 2014. Using Windows 7 Professional with service pack 1. Jan 5, 2015 at 17:05

I believe you would have to run the sync client as a service. To do so, you can use Sc.exe.

I can't test this but the syntax should be something like this (from an elevated command prompt):
sc create GoogleDriveService displayName="Google Drive Service Wrapper" start=auto obj=WINDOWS_USERNAME password=PASSWORD binPath=PATH_TO_GOOGLE_DRIVE_EXECUTABLE

Piece by piece:
sc: creates the service
create: command to create service (see also, delete)
GoogleDriveService: a string you make up to give the service a name
displayName="Google Drive Service Wrapper": string shown under Name column of services.msc
start=auto: start on boot
obj=WINDOWS_USERNAME: Windows account that is syncing with Google Drive

  • Which executable needs to be executed and with what switches? What will happen to the service if it is waiting for user input? Will it hang or will it continue to sync? Or is it possible to use the correct switches to prevent the executable from raising any user interaction such as the login dialog?
    – njr101
    Aug 20, 2012 at 15:19
  • @njr101 I would look at the shortcut properties to see if any switches are used. As I don't use it, I can't look into much further. Aug 20, 2012 at 15:20
  • The shortcut includes a /autostart switch but as I say, this can raise user interaction under some circumstances. I realise that converting an app to a service will allow it to run without a logged-in user, but what I specifically need to know is whether there is a supported model for doing this with Google Drive. Even if not officially supported, at least a method someone has tried and can verify works.
    – njr101
    Aug 20, 2012 at 15:23
  • @njr101 can you give an example of a software that runs while a user is not logged in? Dec 7, 2012 at 4:46
  • SQL Server, IIS, Oracle, etc. These services all run even if there is no interactive Windows user logged in to the console.
    – njr101
    Dec 10, 2012 at 8:36

@martin There's a bug in Googledrivesync that disables restarts if the "Start on login" switch is enabled in the preferences panel. That's why it's flashing when you restart it. (I would have put this message in the comment thread where it belongs but don't have the points to do so.)

To use Window's task scheduler to control GoogleDriveSync, disable the auto start option in the app's preference panel.

I specifically don't want GoogleDriveSync running most of the time as it interferes with other scripts that create and delete temporary files in the folders GDS backs up. Rather than rewrite the scripts to use a temporary folder outside of GDS's purview, I use the Task Scheduler to control when GDS does and doesn't run.

  1. Log into the server or desktop with the account that you want to run the service as and setup google drive. Configure google drive to not run at startup and exit the application.
  2. Download srvany.exe from Microsoft Windows 2003 Resource Kit (available free from Microsoft). Copy srvany.exe into the folder where google drive is installed.
  3. 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= "<domain>\<username>" password= "<password>" binPath= "C:\Program Files (x86)\Google\Drive\srvany.exe"
  4. Goto your Start Menu, type in regedit and goto the new service (in this case GoogleDriveSync) HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\GoogleDriveSync
  5. Create subkey Parameters below which you must create two string values:
    1. Create an 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 an String Value called AppParameters with the relevant parameters for googledrivesync.exe (e.g /autostart --noshow_confirmation_dialog_on_delete)
  6. 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.

  • srvany.exe is part of the Microsoft Resource Kit which does not exist for Windows 10.
    – Ex Umbris
    Dec 9, 2020 at 0:40

I don't know when this option was included in googledrivesync.exe, but, on "Advanced" tab, on "System Settings" section there is an option that allows to "Start Google Drive on system startup".

This will start the Google Drive when the system starts up, so it will sync the folders even if no user logs in.

  • That doesn't seem to work.
    – Ex Umbris
    Dec 9, 2020 at 0:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .