echo off

REM If no command line options specified go immediately to ShowUsage
If "%~1" == "" goto ShowUsage

set param1=""
set param2=""
If "%~2" == "" goto DoneWithParams

set param1=%2

If "%~3" == "" goto DoneWithParams

set param2=%3

:DoneWithParams

pushd "%~dp0"

TTUSuiteSilent.exe {F075B63A-C629-41F8-BA56-33D9940F2000} 20.00 "%1" ODBC %param1% %param2%

popd

goto eof


:ShowUsage

  echo Usage: silent_install.bat "<list of features>" [installdir] [keepPrevVer]
  echo.
  echo Where: "<list of features>" is a comma separated list of the features 
  echo        enclosed in quotes to be installed silently.
  echo.       
  echo.       [installdir] is optional and is a fully qualified path, e.g. C:\MyFolder, "C:\My Folder"
  echo.       
  echo.       [keepPrevVer] is optional and will remove the previous release
  echo.       
  echo.       Note: The order of the optional parameters does not matter.
  echo.
  echo Example: silent_install.bat "TDWALLET,ODBC"
  echo Example: silent_install.bat "TDWALLET,ODBC" "C:\MyFolder"
  echo Example: silent_install.bat "TDWALLET,ODBC" "C:\MyFolder" keepPrevVer
  echo Example: silent_install.bat "TDWALLET,ODBC" keepPrevVer "C:\MyFolder" 
  echo.
  
  goto eof

:eof
set param1=
set param2=

