cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
PlinyElder
Level 7

SQL Server Express install as feature NOT Prerequisite

I am needing to have SQL Server installed as an optional feature by the user. Currently i see that you can install SQL Server as a prerequisite to the installer but not to a feature or component. Is there a way to install/uninstall this as a component? I tried to create a custom prerequisite of my own but i am still not allowed to assign that to a feature. Would like this to be able to be downloaded from the web if the user chooses to install it instead of having to package the sql installer with my installer, this takes up unnecessary space for the download.
Labels (1)
0 Kudos
(4) Replies
DLee65
Level 13

The need to install this as a prerequisite comes from Microsoft and not InstallShield. Ever since SQL Server 2008 R2, Microsoft introduced a check that restarts the msi engine. When it does that then InstallShield will loose the handle to the current installer and the setup errors out.

The solution for myself was to utilize the Suite / Advanced UI features of the Premier edition of InstallShield. This allowed me to present a unified UI for the install experience while masking all of the prerequisite installations. I can then set conditions for the primary MSI package based on settings the user implemented in the UI portion of the install.

As a pure MSI though, I have not found a way to overcome this limitation.
0 Kudos
PlinyElder
Level 7

DLee65 wrote:
The need to install this as a prerequisite comes from Microsoft and not InstallShield. Ever since SQL Server 2008 R2, Microsoft introduced a check that restarts the msi engine. When it does that then InstallShield will loose the handle to the current installer and the setup errors out.

The solution for myself was to utilize the Suite / Advanced UI features of the Premier edition of InstallShield. This allowed me to present a unified UI for the install experience while masking all of the prerequisite installations. I can then set conditions for the primary MSI package based on settings the user implemented in the UI portion of the install.

As a pure MSI though, I have not found a way to overcome this limitation.


Im still new and learning Installshield, so are you saying that i need to create a separate msi installer for SQL, then add that as a "Package" to the Advanced Suite package? I am using the Installshield 2014 Premier Application
0 Kudos
DLee65
Level 13

PlinyElder:

No you will not have to create an installer for the Microsoft package. Right now you have a single EXE for whatever version of SQL Server you are trying to distribute.
You would add this EXE file as a dependency package to the suite project type. You can also import the prerequisite file (.prq) for SQL Server and the settings found in that PRQ file are imported into a format used by the Suite/Advanced UI package type. Just be aware that you have to review the settings for each one you import because environment variables use a different format in a prq file than in the suite file.

For example, in my setup I have three separate 'Features'. Each feature can have any number of 'packages' assigned to it.
Feature1: System prerequisites.
Feature2: SQL Server 2012 SP1, condition: INSTALLSQL=YES
Feature3: App Prerequisites, main application

Feature1 includes things like .NET Framework, C++ runtime redistributables, XML parser, etc.
Feature2 just includes SQL Server 2012 installer. It only installs if the condition INSTALLSQL equals "YES".
Feature3 includes things specific to our application such as Crystal Reports, other third party installers, and our main MSI package.

This structure allows us to easily bundle a main server application and client application. I added a custom dialog that asks the user which type they want and based on their selection the property INSTALLSQL is set to YES or NO. This property can also be passed in on a command line to facilitate a silent install.

I know that it can be difficult to wrap our brain around how best to structure an install and various third party technologies. It took me quite a while to figure out the Suite structure and various idiosyncrasies and I am still learning.
The sad reality is we are forced to explore other approaches because we cannot bundle the SQL Server as a feature prerequisite any more. The last version that supported this was SQL Server 2005. The good news is that I think I read somewhere that Microsoft 'Fixed' the problem in SQL Server 2014 by providing a command line option to ignore the check for system requirements, which is where the install is currently failing.
0 Kudos
PlinyElder
Level 7

OK, this has worked for me so far. Thank you for the help
0 Kudos