We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

kevntrace
Posts: 2
Joined: Wed Jul 31, 2013 9:11 pm

Newbie - Assistance Needed

I have a need to build a solution which installs an ODBC driver then allows the user to configure an ODBC DSN and test the connection. This seems like, in theory at least, it should be pretty straightforward to accomplish with Advanced Installer. I am currently using the free 30 day trial, but if I can build this solution, there is a guaranteed purchase of Advanced Installer at the end of this task.

The ODBC driver I need to install and configure is custom (I work for a software company that builds a server and ODBC driver). There are some nuances I need to be able to handle - we have 32bit and 64bit versions of our ODBC driver, so setting up a DSN will be different (e.g. configuring the 32bit driver on a 64bit Windows machine) under certain circumstances. I'm not too worried about that right now - I'll assume Advanced Installer can detect (and tell me) what version and architecture of Windows I am on. I'll also presume I can somehow code logic so I can present a custom dialog that asks the user to pick from a 32bit or 64bit install of my ODBC driver.

Rather than worry about some of the complexity in my final solution, I want to concentrate on the basics first. Build a project that lets you plug in the information to connect to a MySQL database and test the connection. But I am struggling with this simplest of tasks before I even tackle the complex stuff. I simply want to build a project that builds a MySQL database connection (where the user plugs in the host, port, username, password, database name) and create a test connection to the database. I have already manually installed the MySQL ODBC driver, and manually built and tested an ODBC connection. So I know this stuff works manually, now I just need to automate part of it (building the connection and testing) with Advanced Installer.

I see there are tutorials in the Advanced Installer online documentation. I have, to the best of my ability, followed the online tutorials. But my project does not work. When I click on the "Next" button after filling in the database connection properties, nothing happens. I am guessing I have messed up the control flow logic somehow. But I am a complete newbie to writing installer packages, and a newbie to Advanced Installer.

I have emailed support but they have been less than helpful so far. I am at a complete stop, and need help to move forward. Any suggestions?

It would be really helpful if you guys had a repository of working example projects which developers could download and tweak. This is really helpful to newbies such as me, who face a steep learning curve.

So - does anyone have an example, working, project that shows how to get the user to supply input values and use those values to make an ODBC connection? I am happy to take any standard database connection at this point (Oracle or MySQL are easiest for me). I just want to see a working example of this stuff. Then I can start building off that.
kevntrace
Posts: 2
Joined: Wed Jul 31, 2013 9:11 pm

Re: Newbie - Assistance Needed

And a couple of follow on questions.

As part of configuring our ODBC DSN I need to create a file in the location %HOMEDRIVE%\ProgramData (this is on Windows 7). Is Advanced Installer aware of the %HOMEDRIVE% location? If so, how do I get to that? If not, any other suggestions?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Newbie - Assistance Needed

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

In order to install an ODBC driver you can take a look on our "Configure an ODBC Driver" article section.
I simply want to build a project that builds a MySQL database connection (where the user plugs in the host, port, username, password, database name) and create a test connection to the database. I have already manually installed the MySQL ODBC driver, and manually built and tested an ODBC connection. So I know this stuff works manually, now I just need to automate part of it (building the connection and testing) with Advanced Installer.
In order to test your SQL connection string you can follow our "How to test SQL connection parameters?" article steps. Also, you can take a look on our "Configure MySQL Server Connection" how to which can be useful for you.

Please keep in mind that our "TestODBCConnection" custom action is a 32-bit module, therefore it can see only 32-bit ODBC drivers. So, you can test only connections using your 32-bit ODBC driver. If on target machine doesn't exist a 32-bit version of your ODBC driver, then the "TestODBCConnection" will fail.
As part of configuring our ODBC DSN I need to create a file in the location %HOMEDRIVE%\ProgramData (this is on Windows 7). Is Advanced Installer aware of the %HOMEDRIVE% location? If so, how do I get to that? If not, any other suggestions?
For this you can simply add the related file under "Common Application Data" folder from "Files and Folders" page. Also, you can get the volume of the windows folder using the WindowsVolume property.

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

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”