Here is a copy of what I am using with SyncBack. It backs up the existing settings runs syncback and then restores the previous settings. If there are no existing settings it still works fine but gives some error messages. Let me know any suggestions as this is my first batch file and I am still learning. I tried registry rapper first but it didn't backup the existing registry settings so if I use it somewhere where it is already installed they will loose all the profiles.
@ECHO OFF
REM **********************************************
REM SyncBack Startup
REM **********************************************
REM Try to export the existing SyncBack registry Settings to SyncBack_Exist.reg
REG EXPORT HKEY_CURRENT_USER\Software\MJLSoftware SyncBack_Exist.reg
REM Delete the existing SyncBack registry settings
REG DELETE HKEY_CURRENT_USER\Software\MJLSoftware /f
REM Checking if a specific reg file exists if so add it to the registry
if exist SyncBack_%computername%.reg regedit /s SyncBack_%computername%.reg
REM Starting SyncBack
REM STart SyncBack then wait for it to exit before continuing
start /WAIT syncback.exe
REM Exporting Portable Settings for next session
REG EXPORT HKEY_CURRENT_USER\Software\MJLSoftware\ SyncBack_%computername%.reg
REM Deleting the Portable Settings from the registry
REG DELETE HKEY_CURRENT_USER\Software\MJLSoftware /f
REM Check if there were any existing settings if so add them to the registry
if exist SyncBack_Exist.reg regedit /s SyncBack_Exist.reg
REM Check if the existing registry setting file is still present if so delete it
if exist SyncBack_Exist.reg DEL SyncBack_Exist.reg
exit