Google Drive as a service or background

I have a server that does automatic backups, now I need to synchronize these backup files with Google Drive, but I do not want to connect to a Windows server every day to force Google to synchronize.

ΒΏDoes anyone know a synchronization method or script to load in the background without user interaction?

Well, I understand, so I publish for everyone who needs to run the application to synchronize with Google Drive, without entering windows:

  • create a scheduled task with an action launcher pointing to: C: \ Program Files (x86) \ Google \ Drive \ googledrivesync.exe
  • add argunment: / autostart
  • mark to run if user is not logged in
  • I also noted execution with higher privileges
  • The trigger is started by the system with a delay of 30 seconds, it is very important to make a delay!
  • uncheck the box that stops the task if it works for more than x days, this is due to the fact that Google synchronization always works in the background.

Now I need to copy the backup files to the Google drives folder and run the cmd script + sheduled command.

+6
source share
1 answer

If you are running Windows Server 2003, you can try the following steps to start Drive as a service:

Download and install the Windows Server 2003 Resource Kit, which can be found here.

Open a command prompt and run the following:

C:\Program Files (x86)\Windows Resource Kits\Tools>instsrv GoogleDrive "c:\Program Files (x86)\Windows Resource Kits\Tools\srvany.exe" 

Next, change the user for the new GoogleGrive service. Change this to "Administrator".

Type the following command at a command prompt to open the services snap-in in the console:

 services.msc 

Select properties on GoogleDrive. Click the Log In tab. Click This Account and select Admin. Set the appropriate password. Click "Apply" and "OK"

Next, you need to configure some registry settings for the service. Open the registry editor by typing the following command at a command prompt:

 regedit 

Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\GoogleDrive Create a new key "Parameters" Add a new string value "Application" (type REG_SZ). Set the value for the path to C:\Program Files (x86)\Google\Drive\googledrivesync.exe /autostart . Close Registry Editor Return to Services and start the GoogleDrive service.

This has been adapted from the Dropbox article as a service, which can be found here .

Essentially, the process is to create a Windows service using "srvany.exe", which is a Windows service shell that will run any program as a service.

+1
source

Source: https://habr.com/ru/post/958651/


All Articles