Running Sugarsync as a Service

Image

I have a small Windows Server 2008 R2 system in my home office.  This system serves me as my primary workstation as well as delivering some lightweight file sharing services for my home network– photos, music and the like.  In addition, I am running clients for several cloud file sharing services on this system.  It’s occurred to me that it would be an advantage to having these cloud files synchronize on this system even if I’ve not logged into the console.  Specifically, I would like to run SugarSync in the background, without being logged in; I want to run SugarSync as a “service”.

When something is configured to run as a service, it is typically set to auto start at system boot time without needing a user to login to the system.  In the case of SugarSync, this means that files will be synchronized in the background.  Should there be a power outage, or the server is rebooted for some reason, when power is restored and the server is restarted, SugarSync will also be restarted, without the need for anyone to login to a user account.

Following are the steps I’ve found which enable me to configure and run as SugarSync as a service.  I’ve had success with this on Windows Server 2008 R2 and Windows 7 (both 64-bit).

  • (If not already installed and running,) Download, Install and Configure SugarSync
  • Set Application Preferences to be Compatible with Running as a Service
  • Setting SugarSync up as a Service
  • Configuring the service
  • Modify the Registry
  • Start the SugarSync Service

(If not already installed and running,) Download, Install and Configure SugarSync

If you do not already have a SugarSync acccount, click here to sign up for one. (Full Disclosure: clicking on this link will use my referral code when signing up for your new SugarSync account.)

If you already have a SugarSync account, but need to download the latest version of the SugarSync client software, click here.

When the download of the client software is complete, double click on the executable installation file to run the installer.

After the client has been installed, configure the client with your account username and password and allow the software to complete its initial synchronization.

When the initial synchronization has completed, you are ready to proceed with adjusting the application preferences to be compatible with running as a service.


Set Application Preferences to be Compatible with Running as a Service

Once it’s fully installed, and you have created or logged in to your SugarSync account, right click on the SugarSync icon in your taskbar and select the “Open SugarSync” option:

SS Image 01

Select the “Tools” menu and the “Preferences” sub-menu:

SS Image 02

On the “General” tab, un-select all of the options:

SS Image 03

On the “SugarSync Drive” tab, deselect the top two options:

SS Image 04

Click “OK”.

Select the “SugarSync” menu item and then select “Exit”:

SS Image 05


Setting SugarSync up as a Service

Use this link to download and install Windows Server 2003 Resource Kit Tools (When you first click on the installer, you will receive an error about the software having known issues. It is safe to ignore this warning.)

Click the start button, type CMD, right click on the single icon that shows up titled cmd.exe, and select “Run as Administrator”.

Copy and paste the following command (note that the spacing is significant and important):

sc create SugarSync binPath= "C:Program Files (x86)Windows Resource KitsToolssrvany.exe" DisplayName= "SugarSync Service"

If everything went right, you’ll see the message: [SC] CreateService SUCCESS

If you see anything else, it’s probably a problem with the path of your installed Resource Kit Tools, or you are not running the 64 bit version of Windows.


Configuring the service

Click the start button, type "Server Manger", and click on the program.

When the Server Manager has opened, expand the "Configuration" option and click on "Services".

SS Image 06

In the "Services" panel on the right hand side of the windows, scroll down to and double-click on "SugarSync Service"

On the "General" tab (it will be the first screen that you see), set the startup type to be "Automatic".

SS Image 07

Select the "Log On" tab, change the "Log on as:" to "This account" and specify the account name under which SugarSync has been installed and configured.  This will become the account in which the new SugarSync service will execute.  Be certain to put in the correct password for the account as well.

SS Image 08

Click “OK”.


Modify the Registry

Click the start button, then type "regedit" and click on regedit.exe when the program shows.

Navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSugarSync

Right click in the blank white space on the right side of the screen.

Point to "New" then click on "Key"

SS Image 09

This will create a new folder under SugarSync.  Rename this folder to be titled "Parameters" and press enter.

Right click on the new folder, select "New", then select "string".  Rename the string to be titled "Application" and press enter.

Double click the word "Application" which now appears on the right.

Set the value to be the path to the sugarsync.exe binary.  Find the location by right clicking on the SugarSync icon on the desktop. i.e.:

C:Program Files (x86)SugarSyncSugarSync.exe

Close the Registry Editor.


Start the SugarSync Service

The configuration of SugarSync as a service is complete!

Reopen Server Manger, and go to services.

Right click the “SugarSync Service” and click “Start”.

SugarSync should now be running in the background as a service.  Test that it is working by creating or copying a text file into one of the synchronized directories and verifying that the file was copied to either another computer which you have available locally or to the SugarSync.com web site.

Note: From this point forward you do not want to run the SugarSync Manager as a stand-alone program. It it already running in the background as a service. If you start it a second time, it will conflict with itself and lead you down a path resulting in a system reboot.


Questions

If you have trouble with these steps or have questions, please leave a comment and I’ll do my best to answer in a timely manner.

Note: I was able to use essentially this same basic process to get Dropbox to run as a service on Windows Server and Windows 7 as well. When I have a spare hour, I’ll write up a step-by-step, but if you are feeling adventurous, know that I was able to get Dropbox running as a service with little incremental effort, so you should be able to as well!