Setting up ODBC via command line

previous  Top  next

When installing software on several clients, automatic configuration steps are usually preferred. From the 2016 version onwards, you can also specify additional parameters such as destination directory, silent mode and data for setting up the ODBC connections when the installation is done via command line.



Target directory


The switch for the target directory reads /D. The installation file must always be the last parameter and must not stand between inverted commas, not even if there are spaces.


Example: SetupUntis2019.exe /D=C:\Untis



Silent Installation


The installation can be performed via the command line in silent mode. Use option /S.


Example: SetupUntis2019.exe /S



Automatic set-up of ODBC connection


You can initiate the automatic set-up of the ODBC connection (user DSN) via the command line. You can choose between three parameters.



Name of the ODBC driver (obligatory). This is the name which is visible in the column 'driver' in the ODBC Data Source Administrator (e.g. 'Microsoft Access Driver (*.mdb, *.accdb)'. Please note that (e.g. for MySQL) the driver needs to already be installed and that the 32-bit version is required in most cases (see chapter *64-bit operating system) .



Additional parameters for the ODBC connection such as path of the mdb file or unser name, password, server or database for MySQL/MS-SQL. These parameters are specified the following        'key1=value1;key2=value2;...' , whereby keys and values depend on the producer of the database. In the following we list examples for the most widely used parameters.



Optional name for die ODBC connection. If no name has been specified, then an ODBC connection called 'Untis' will be created.





Access: SetupUntis2109.exe /S /odbcdriver='Microsoft Access Driver (*.mdb, *.accdb)' /odbcparams='DBQ=C:\DB\Untis.mdb'


Creates an ODBC connection which directs to the file C:\DB\Untis.mdb


MySQL: SetupUntis2019.exe /S /odbcdriver='MySQL ODBC 5.1 Driver' /odbcparams='SERVER=;DATABASE=Untis;UID=dbuser;PWD=passwd;PORT=3306'


Creates an ODBC connection accessing the server via the port 3306, database name 'Untis', user 'dbuser' and password 'passwd'.


MSSQL:< SetupUntis2019.exe /S /odbcdriver='SQL Server' /odbcparams='SERVER=SERVERNAME\MSSQL;DATABASE=Untis;UID=dbuser;PWD=passwd'


Creates and ODBC connection accessing the server 'SERVERNAME\MSSQL', database name 'Untis', user 'dbuser' and password 'passwd'.