1

NB Please note that this is a non-Postill question. It is intended for people who understand something about Google Backup and Sync, and scripting, and wish to answer a question about it.

The problem I have is that the drive where I keep My Documents is now Bitlocked.

This means that B&S complains "a synced drive is currently unavailable". Even after I have run a script to mount the drive in question, B&S can't sort of dynamically find it and get started.

I am thus obliged to click "Stop syncing", and it somehow starts up again.

Ideally I'd like to suppress the startup of B&S, and start it programmatically using a script (.bat or Python file) I run after I unlock/mount the Bitlocked drive.

GB&S does not appear to be a W10 service, and I don't know how it sets itself in motion at startup. There's a suggestion here of a way to kill the process. Is that all there is?

1 Answers1

0

I don't know of any switches available for googledrivesync.exe, except /autostart. You can use taskkill to kill off GB&S once it has started, like so:

taskkill /IM googledrivesync.exe /F

... however, apart from the fact that this shutdown operation seems to take a very long time (5 seconds or so), it is no doubt better to prevent it launching in the first place, as it will not run properly since the Bitlocked drive is not yet mounted.

To prevent it running, run regedit.exe. Find this key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\GoogleDriveSync.

Mine was setup with this value: "C:\Program Files\Google\Drive\googledrivesync.exe" /autostart. I changed to "C:\XXXXProgram Files\Google\Drive\googledrivesync.exe" /autostart (you could just delete the key of course).

This .bat file has to be run with an elevated prompt for manage-bde:

REM ################ UNLOCK BITLOCKED DRIVES 
manage-bde -unlock D: -password

REM ... other startup tasks

REM ################ START GOOGLE BACKUP&SYNC call "%PROGRAMFILES%\Google\Drive\googledrivesync.exe" REM NB it appears to take at least 5 seconds for the icon to appear in the taskbar