Approach to restarting Google Drive periodically under Windows

5,935

If you want it to automatically run periodically, just use Task Scheduler (search for it in the Start Menu) to run a batch script.

The batch script should contain:

taskkill /f /im googledrivesync.exe
ping 1.1.1.1 -n 1 -w 2000 > nul
start "" "C:\Program Files (x86)\Google\Drive\googledrivesync.exe"
exit

The ping command is there just to add a delay between killing and restarting googledrivesync.exe

Share:
5,935

Related videos on Youtube

TheEdge
Author by

TheEdge

Updated on September 18, 2022

Comments

  • TheEdge
    TheEdge almost 2 years

    I run GoogleDrive on an unatteded Windows 7 machine. Periodically I have to restart Google Drive as GD gets itself into a state where it stops syncing. Restarted GD fixes the issue.

    Has anyone got a BAT file or similair approach that I can schedule to do the restart of GD so I don't have to do it manually?

    • Riccardo
      Riccardo over 7 years
      Did you try the proposed solution? Is it working?
    • TheEdge
      TheEdge over 7 years
      I have not tried it. I do know the ping part will do the trick as I have used that as a way to pause between requests. GD has been stable for a couple of months so until I know it breaks regularly I am loathe to mess with it.
    • Riccardo
      Riccardo over 7 years
      I have configured this on a server but sometime it hangs. I wonder if terminating the program with taskkill may lead into data corruption!
    • Riccardo
      Riccardo over 7 years
      What config are you using to start Drive? run as a service or task scheduler? If any of those, coul you point out what settings are you using both to start the exe and what advanced settings in drive client? Thanks!
    • Joel Mansford
      Joel Mansford over 4 years
      Don't bother, see my answer below, switch to a low-cost 3rd party client with support who will actually help you resolve any issues.