Parameters, logs, and exit codes

Top  Previous  Next

The command line interface requires the name of the export settings file as the first parameter.

 

Settings file name: mandatory

 

SQLImageViewerCmd.exe "g:\export\settings.sbv"

 

/LOG: optional

 

The command line interface will save a log of the export events to the application folder (C:\Users\All Users\Yohz\SQL Image Viewer\Logs\).  You can save an additional copy of the log to a file name of your choice.  You do this by using the /LOG parameter e.g.

 

SQLImageViewerCmd.exe "g:\export\settings.sbv" /LOG "x:\export\exportlog.txt"

 

/ERRORLOG: optional

 

You can also save only errors and warnings to a log file.  You do this by using the /ERRORLOG parameter e.g.

 

SQLImageViewerCmd.exe "g:\export\settings.sbv" /ERRORLOG "x:\export\exportlog_errors.txt"

 

The command line interface returns with exit code 0 when no errors or warnings are encountered.  If any warnings were raised, exit code 1 is returned.  Exit code 2 is returned when errors were raised.

 

/NODEFAULTLOG: optional

 

You can also choose to not create the default log file.  You do this by using the /NODEFAULTLOG parameter e.g.

 

SQLImageViewerCmd.exe "g:\export\settings.sbv" /NODEFAULTLOG

 

/KEEPLOGS: optional

 

The default log files will accumulate over time.  You can choose to delete old log files using the /KEEPLOGS parameter.  In the following example:

 

SQLImageViewerCmd.exe "g:\export\settings.sbv" /KEEPLOGS 1

 

will delete log files older than a day in the default log folder.  You can also specify the age in hours, using the h suffix e.g.

 

SQLImageViewerCmd.exe "g:\export\settings.sbv" /KEEPLOGS 6h

 

In this case, SQL Image Viewer will delete log files older than 6 hours in the default log folder.