Ryan
Posts: 3
Joined: Thu Jul 04, 2013 10:26 pm

ODBC Driver Changing APPDIR

I added an ODBC Driver to my install project and it is forcing APPDIR to change to a different folder on its own. I've attached one part of the log file where the change happens.

Has anyone ran into this behavior or know why it may be happening?

Code: Select all

MSI (s) (38:D4) [16:39:47:750]: Doing action: SetODBCFolders
Action 16:39:47: SetODBCFolders. Initializing ODBC directories
Action start 16:39:47: SetODBCFolders.
MSI (s) (38:D4) [16:39:47:781]: LocalSQLInstallDriverEx returned 1 in remote context.
ODBC driver SQL Anywhere 11 forcing folder APPDIR to C:\WINDOWS\system32\
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: ODBC Driver Changing APPDIR

Hi and welcome to Advanced Installer forums.

If an ODBC Driver that must be installed already exist on the target machine then the directory of the driver in the MSI is set to the directory of the existing driver on the target machine.

So, in order to overcome this problem, you can place your driver in a subfolder of APPDIR and do not include in that folder files that are not related to the driver. In this case only the folder containing the driver will be redirected, but the APPDIR will not be changed.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Ryan
Posts: 3
Joined: Thu Jul 04, 2013 10:26 pm

Re: ODBC Driver Changing APPDIR

Thanks for the help. That solved one problem, but now my installer is hanging when it is installing the datasource. It was working find until I added the ODBC driver and ran into my first problem.

Here is the end of the log file. The installer just sits. You can still hit the 'X,' but when you say 'Yes' to exiting it does nothing.

Code: Select all

MSI (s) (24:CC) [14:48:06:234]: Executing op: ActionStart(Name=InstallODBC,Description=Installing ODBC components,)
Action 14:48:06: InstallODBC. Installing ODBC components
MSI (s) (24:CC) [14:48:06:250]: Executing op: ODBCInstallDriver(DriverKey=SQL Anywhere 11,Component={62B5CEBF-BFB3-44C0-A007-790DB15C4150},Folder=C:\WINDOWS\system32\,Attribute_=Driver,Value_=dbodbc11.dll)
1: SQL Anywhere 11 2: {62B5CEBF-BFB3-44C0-A007-790DB15C4150} 3: C:\WINDOWS\system32\ 4: Driver 5: dbodbc11.dll 
MSI (s) (24:CC) [14:48:06:328]: LocalSQLInstallDriverEx returned 1 in local context.
MSI (s) (24:CC) [14:48:06:500]: LocalSQLConfigDriver returned 1 in local context.
MSI (s) (24:CC) [14:48:06:500]: Executing op: ODBCDataSource(DriverKey=SQL Anywhere 11,,Registration=4,Attribute_=DSN,Value_=mvs)
1: SQL Anywhere 11 2:  3: 4 4: DSN 5: mvs 6: UID 7: DBA 8: PWD 9: sql 10: DatabaseFile 11: C:\Program Files\mvs.db 
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: ODBC Driver Changing APPDIR

Hi,

This is a Windows Installer problem which usually appears when it tries to configure a DSN that has some attributes specified in the project (in the "Attributes" section of the Data Source).

As a workaround, you can install the DSN using registry entries. The "ODBC Data Source" can be registered in the "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources" key and the settings can be added in the "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.ini\YourDSNname" key.

We already have an improvement on our TODO list to replace this Windows Installer functionality and it will be available in a future version of Advanced Installer.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Ryan
Posts: 3
Joined: Thu Jul 04, 2013 10:26 pm

Re: ODBC Driver Changing APPDIR

That fixed it. Thanks for the help.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: ODBC Driver Changing APPDIR

You're welcome. I'm glad you got this working.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”