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!

BCh
Posts: 63
Joined: Wed Jan 17, 2007 6:32 am
Location: Australia

SQL ODBC quiet install with Database restore issue

Hi,

Working on an install process where:
1) Installs SQL 2014
2) Install ODBC drivers so I can...
3) Restores a new database into SQL.
4) Install Application.

Trying to do all as a quiet install where users do not have to select anything.

Can do (1) OK.

Cannot do (2) as a silent install. I am using https://msdn.microsoft.com/en-us/librar ... .110).aspx as a guide to the parameters for a silent install.

While I have Microsoft ODBC Driver 11 for SQL Server as a Requirements / Prerequisites / Pre-install whenever I put something in the Install Command Lines (via Requirements / Prerequisites / Packages / Pre-install / Setup Files) the install of the ODBC prerequisite fails.
I can get (2) OK if I put nothing in the Install Command Lines but then have to select options during the install - this is not really a valid option for my user community.

I have tried the following in the command line:

- "msiexec /Option /quiet /passive /qn /i msodbcsql_amd64.msi IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL /log odbcinstall"
- "/Option /quiet /passive /qn /i msodbcsql_amd64.msi IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL /log odbcinstall"
- "msiexec /quiet /passive /qn /i msodbcsql_amd64.msi IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL /log odbcinstall"
- "/quiet /passive /qn /i msodbcsql_amd64.msi IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL /log odbcinstall"
- "/quiet /passive /qn IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL /log odbcinstall"
- <blank>
- "/qn IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL"


Once I have (2) done I am then struggling to get the Restore of my database using this SQL driver. (3)

I am setting up details in Server / ODBC for defining the Data sources and then using the ODBC Data Source defined in Server / ODBC in Server / SQL Databases selecting the data source from the drop down besides ODBC Data Source under Project Data Sources (assuming this is the data source defined in Server / ODBC.

Also getting message {SQL_STATE: IM002} Data source name not found and no default driver specified.

I have checked and re-checked Server details and data source names exists etc.


Help will be very much appreciated.

Thanks,

Brian
BCh
Posts: 63
Joined: Wed Jan 17, 2007 6:32 am
Location: Australia

Re: SQL ODBC quiet install with Database restore issue

Found issue with the restore of database due to SQL Services did not start after the install - even when install parameters set to automatic.

Once manually started SQL could then restore database OK.


Issue still outstanding is the silent install of ODBC - how / what do I put the commands in the command line.

Thanks,

Brian
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: SQL ODBC quiet install with Database restore issue

Hello Brian,

Please note that every time you add an MSI package as a prerequisite to your setup project, at install time the parent setup package will launch the MSI prerequisite with the following command line:

Code: Select all

msiexec.exe /i prereq_name.msi
To the above command you can append command line parameters you specified in the "Install Command Line" fields. So, in the "Install Command Line" fields you should use a command like this:

Code: Select all

/qn IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL
without specifying the "msiexec /i msodbcsql_amd64.msi". The msiexec install process is automatically called by Advanced Installer.

Also, this is very important, every time you want to install an MSI silently (e.g. using /qn switch) you must make sure the MSI installation process is launched elevated, otherwise the installation will fail. This is a Windows Installer rule. So, to make sure you can silently install your MSI prrerequisite ( Microsoft ODBC Driver 11) you should assure that your main installation process runs elevated. For instance, you can enable our "Run as administrator" option from "Install Parameters" page.

If you have any questions just let us know.

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

Return to “Building Installers”