Steve.Hipwell
Posts: 9
Joined: Tue Feb 12, 2013 4:14 pm

Installing SQL 2012/prerequisite based on a Feature

We require the ability to install SQL Server 2012 if a specific feature has been chosen to be installed by the user. We spent a lot of effort making this work using the prerequisite as a feature functionality. This stopped working from SQL Server 2008 R2 SP1. After looking around your forum I attempted to install SQL Server as a Post-install prerequisite but this does not work either.

How can we get the desired behaviour?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Installing SQL 2012 Based On A Feature

Hi and welcome to Advanced Installer forum.

Thank you for your interest in Advanced Installer.

In order to achieve this you can add your "SQL Server 2012" prerequisite in the "Feature-based" folder from the "Prerequisites" page, then go in the "Organization" page and drag-and-drop the feature that contains your prerequisite under the feature that you want this prerequisite to depend on.

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
Steve.Hipwell
Posts: 9
Joined: Tue Feb 12, 2013 4:14 pm

Re: Installing SQL 2012 Based On A Feature

Please read my post again! If you had read my post correctly then you would have seen that I clearly state that it does not work either as a feature or as a post-install prerequisite! As you are in the installer business you should know about the limitations of the Microsoft SQL Server installer since 2008 R2 SP1.

Why does getting a straight answer from you take so much effort?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installing SQL 2012 Based On A Feature

Hello,

First of all we apologize for not being aware about this issue. Thank you for bringing it to our attention.
Hi all, thanks for taking the time to report this issue. Installing SQL Server 2012 from within a Windows Installer transaction is not supported. Setup needs to be launched from outside of windows installer and can't be done from a custom action.

thanks,
[SQL Server Team]
Unfortunately, as Microsoft SQL Server Team says, the SQL Server 2012 package cannot be installed through a custom action. So, I'm afraid the only solution is to be added as a pre-install prerequisite. But, in this case, it is not possible to be installed based on a feature selection. Therefore, you cannot achieve what you want.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Steve.Hipwell
Posts: 9
Joined: Tue Feb 12, 2013 4:14 pm

Re: Installing SQL 2012 Based On A Feature

In this case then I think we are going to need to discuss a refund. This product is not doing what it is advertised to do (we requested prerequisites as a feature specifically for SQL Server) and the paid for support involves lack of knowledge about the product and bad customer service (e.g. recommending a solution which was clearly described in the question as not working)!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installing SQL 2012 Based On A Feature

Hello,

We've investigated further this issue, and in order fulfill your scenario you can use a custom action (added in Finish Dialogs Stage) which will launch, based on a feature selection condition, the SQL Server prerequisite setup after the main installation finishes.
Here are the steps to proceed:
- Go to "Custom Actions" page and add a "Launch attached file" with sequence, scheduled in Finish Dialogs Stage, which will launch the prerequisite package.
- From "Custom Action Properties" right pane uncheck the "Wait for custom action to finish before proceeding" and "Wait for return code at the end of the sequence" options.
- Build and run your project.

Also, if you want to install in silent mode the SQL Server prerequisite package you can use (in the "Command" field of the above custom action) a command line like this (tested on a Windows 7 SP1):

Code: Select all

/q /ACTION=Install /IACCEPTSQLSERVERLICENSETERMS /INSTANCENAME=SQLSERVER /ROLE=AllFeatures_WithDefaults /ADDCURRENTUSERASSQLADMIN=TRUE /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /FEATURES=SQL
Here's attached a sample, created using version 9.9 of Advanced Installer, which implements a similar scenario.
sample.aip
(12.25 KiB) Downloaded 1610 times
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Steve.Hipwell
Posts: 9
Joined: Tue Feb 12, 2013 4:14 pm

Re: Installing SQL 2012 Based On A Feature

I've done as suggested except I'm using the 'Launch file or open URL using 64-bit launcher' action as I don't want the SQL installer embedded.

I can run with logging to prove that the custom action is being fired, but the SQL installer is not actually being called!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installing SQL 2012 Based On A Feature

Hello,

I'm not sure why this happens. You can try to launch a BAT file (containing the SQL Server package path) and see if the behavior still persist. If so, please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Steve.Hipwell
Posts: 9
Joined: Tue Feb 12, 2013 4:14 pm

Re: Installing SQL 2012 Based On A Feature

I think a better solution would be if you provide me with an example installer that executes either a 64 bit or 32 bit SQL Server installer located next to the base installer.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installing SQL 2012 Based On A Feature

Hello,

Here's attached a sample, created with version 9.9 of Advanced Installer, which implements your scenario.
sample.zip
(2.56 KiB) Downloaded 1361 times
Also, please keep in mind that if you build an EXE installation package, then you should use the SETUPEXEDIR property in the "Command" field of the related custom actions.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Steve.Hipwell
Posts: 9
Joined: Tue Feb 12, 2013 4:14 pm

Re: Installing SQL 2012 Based On A Feature

You forgot to add the /RunAsAdmin switch which is required!

I've come up with a final solution that is linked to the finish button on the installer as otherwise the SQL installation will hang until the installer is closed.
Steve.Hipwell
Posts: 9
Joined: Tue Feb 12, 2013 4:14 pm

Re: Installing SQL 2012 Based On A Feature

This does not work, the SQL 2012 installer still hangs. Did you actually test that this was possible before telling me to do it this way? I did ask for a working example!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installing SQL 2012 Based On A Feature

Hello,

Yes, I've tested the scenario on a Windows 7 64-bit machine and the SQL Server 2012 installed successfully. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them? Also, can you tell us what is your target machine software configuration and if you can reproduce the behavior on multiple machines?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Steve.Hipwell
Posts: 9
Joined: Tue Feb 12, 2013 4:14 pm

Re: Installing SQL 2012 Based On A Feature

Please would you send me a working example project as the last example you sent me certainly didn't work. We are targeting XP to 8 for 32 bit and Vista to 8 for 64 bit. We are currently testing on a Windows 8 64 bit PC.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installing SQL 2012 Based On A Feature

Hello,

I've tested the related scenario and, indeed, it seems that the above workarounds doesn't always generates successful installations. Please give us some time to investigate further this issue and we'll get back to you as soon as we have an conclusive answer. Thank you for your understanding.

Until then you can try the following approach (tested on a Windows 8 x64 machine):
- Extract the resource file (e.g. using 7-zip -> Extract files... option) from the SQL Server 2012 exe package (i.e. SQLEXPR_x64_ENU.exe).
- Create a new Advanced Installer project and add all the extracted files in "Files and Folders" page.
- Go to "Custom Action" page and add a "Launch file or open URL" custom action with sequence, scheduled in Finish Dialogs Stage, which will launch the "setup.exe" extracted file.
- Build and run your project.

Here's attached a sample.
sample.zip
(75.37 KiB) Downloaded 1021 times
Please let us know if this scenario works and is suitable for you.

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

Return to “Common Problems”