Daily Archives: June 23, 2005

Add ODBC support using Astrum InstallWizard

By default, Astrum Installwizard does not support ODBC. You can do it by
adding some variables. Here is an example as following:

1. Advanced/Variables, add a variable named <odbcUserDsnDir>, with a Text
type, Get variable from Registry, Default value "C:Program FilesCommon
FilesODBCData Sources", Root key: HKLM, Path:
HKEY_LOCAL_MACHINESOFTWAREODBCODBC.INIODBC File DSN, and Value name:
DefaultDSNDir. Thereafter, you can use <odbcUserDsnDir> to get file DSN’s
location.

2. Files to install, add the target dsn file, such as notesphr.dsn in my
example, specifying the target directory as <odbcUserDsnDir>. It will make
the dsn file copy from the installation packaget to the dsn default
directory. This is my dsn file’s content:

[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
UID=admin
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DefaultDir=C:Program FilesPhraseMemodatabase
DBQ=C:Program FilesPhraseMemodatabasenotesphr.db

3. In the notesphr.dsn, the last two lines should be changed in reponse of
the installation directory. We can do this with the help of System
changes/Text files. Click Add…, select Replace text action, specify the
filename, which is, in this example, <odbcUserDsnDir>notesphr.dsn, Search
text "DefaultDir=C:Program FilesPhraseMemodatabase" (quote marks
excluded) by replaced with "DefaultDir=<InstallDir>database" (quote marks
excluded), click ok to dismiss the dialog. Same as just now what we did,
replace "DBQ=C:Program FilesPhraseMemodatabasenotesphr.db" with
"DBQ=<InstallDir>databasenotesphr.db"

4. done. The installation will automatically copy your dsn file to the
target computer’s appropriate directory according to the computer’s
settings.

-by tong#cngis.org