Run Tool

Command Line options

There are a couple of different command line options you can use with the Run Tool and Data Sync. Below we will cover what these are and how you can use them.

Remember if you are using 32 bit Office you will need to use the 32 bit versions of Data Sync and the Run Tool. Make sure to change the path to use the 32 bit versions of the software.

Run Multiple Data Sync Steps

You can run multiple Data Sync steps directly from the command line. To do this navigate to your directory that contains your Data Sync steps, then use the following code passing in the names of the steps you want to run:

 "%DATASYNCINSTALLPATH%\Simego.DataSync.Studio.exe" -e "project.dsprj" "project2.dsprj"

This will run each project only if the previous one succeeded.

Run the Run Tool

You can run your Run Tool Project manually from the command line, for example you could use the following script to run a Run Project called Project:

 "%DATASYNCINSTALLPATH%\Simego.DataSync.Run.exe" -e "project.dsrun"

Pass in parameters

You can pass in parameters to the command line to be used in your project, for example you may want to pass a directory path to be consumed by your project.

To do this you need to first add an Import cmd Parameter step to your project, which will take the value you enter in the command line and set this as a setting. Make sure to reference this setting wherever you need to use it, for example in a file copy step.

To set the parameter in the command line you could use the script:

 "%DATASYNCINSTALLPATH%\Simego.DataSync.Run.exe" -e "project.dsrun" -p:directory="C:\Users\user\Documents\RunTool Project"

Taking the above example, you would use this in your project by typing {{directory}} wherever you wanted the path to be written to. This can be in a step, in a log message or even into a user setting.

Below is a table listing the parameters you can use in the command line.

Parameter Name Example Description
Execute -e or -execute Executes the project.
Window -w:min or -window: minimize Minimizes the window on execute.
Property -p:propertyName "value" Passes a property value that can be extracted with the import command line parameter step.
Registry -r "pathToRegistry" Remaps the connection library to the path passed.
Config -c "DEV" or -config "PROD" Overrides the registry path and user settings from a configuration file e.g. DEV.xml or PROD.xml.

An example of what your configuration file might look like to override the connection library to the Dev location and a user setting called MySetting.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Project ConnectionLibrary="C:\ProgramData\Simego\DataSyncStudio30\Dev">  
 <Settings>
   <Setting Name="MySetting" Type="User" Value="MyValue" />
 </Settings>
</Project>