wopms6
Posts: 6
Joined: Tue Jul 10, 2018 5:16 am

Install SQL express 2014 with configuration file

Tue Jul 10, 2018 5:24 am

Hi there,
I am new to Advanced Installer and it's been a week now trying to figure our how to add SQL express 2014 to be installed with my vb.net app along with configuration file but no success. I found different information on the internet but i couldn't find a step by step video on how to do it and what parameters to put.

Would you explain/show me how to achieve this?
I already downloaded SQLEXPRWT_x64_ENU and prepared the configuration file.
I currently use version 14.6

Thanks.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Install SQL express 2014 with configuration file

Tue Jul 10, 2018 9:08 am

Hello and welcome to our forums,

What you are trying to do here is to actually add SQL Express 2014 as a prerequisite for your vb.net application.

This is a step-by-step explaination on how you can achieve that:

1) Presuming that you have added all the other files, we can continue with configuring the SQL Express 2014 as a prerequisite. First thing you have to do is to go to "Prerequisites" page from the "Requirements" group.

2) Now add your prerequisite as a "Pre-Install" prerequisite. In order to achieve this, right click on "Pre-Install" -> "New Package Prerequisite" -> select your SQL Express 2014 package. Please keep in mind that "Pre-Install" prerequisites are handled by our EXE boostraper, so the build will automatically convert to "Single EXE setup (resources inside)" package type.
2.1) I would suggest that you use our predefined prerqeuisites since they are already tested and well configured.

3) Now that we have added the prerequisite, we have to add the configuration file as well. Since "Pre-Install" prerequisites are packages that are installed before the MSI is launched, we can't add it in "Files and Folders" page. We have to add it as an "Additional file" in the prerequisite "Setup Files" tab. In order to achieve this, you can go to "Prerequisites" page -> click on your prerequisite -> click on "Setup Files" tab -> click on "Add files..." button and add your configuration file.

4) Now we have to access the configuration file through a command line. To do this, we have to go to "Setup Files" tab, and in "Install Command Lines", we have to add the command line like as in the example below: :

Code: Select all

/ConfigurationFile=[WindowsVolume]SomeFolder\YourConfigurationFile
where "[WindowsVolume]" is a predefined property which stores the value "C:\" and "SomeFolder" is the folder which contains your configuration file. You have to configure this path so it will be the path to your configuration file. For more
information about this, you can check our "Paths of the folders in the "Files and Folders" Page" article.

5) For more information about prerequisites "Setup Files" tab, you can check our "Prerequisites Setup FIles Tab" article.

Hope this helps!

If you have any further questions or doubts, don't hesitate to contact me and I'll gladly assist.

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

wopms6
Posts: 6
Joined: Tue Jul 10, 2018 5:16 am

Re: Install SQL express 2014 with configuration file

Thu Jul 19, 2018 6:35 am

Thank you Catalin, it was helpful.
I still have an error when installing SQL as prerequisites. The error says that the prerequisites was not installed correctly. I tried to find the solution but I think the problem with the path of SQL configuration file. Why I am saying that? because when I've tried to install the sql server silently via command line (Not with Advanced Installer) I figured out that the configuration file must be inside the folder where the sql setup.exe is, otherwise it will not read it.

Getting back to my project on Advanced Installer, the SQL msi will extract the setup files into my predefined extraction folder and will create another folder called "SQLEXPRWT_x64_ENU" then will put its installation files. From this point, the configuration file will be extracted into my predefined extraction folder only but it will not be inside the folder where the installation files are.

my predefined extraction folder: C:\prerequisites
on the main setup file tab, Folder: SQL Server Express 2014
on the install command line : /q /ConfigurationFile=[WindowsVolume][prerequisites]\SQL Server Express 2014\ConfigurationFile.ini

During the extraction, the setup files will be at C:\prerequisites\SQL Server Express 2014\SQLEXPRWT_x64_ENU\setup.exe

How can I solve this issue?

Thanks
Wopms6

wopms6
Posts: 6
Joined: Tue Jul 10, 2018 5:16 am

Re: Install SQL express 2014 with configuration file

Fri Jul 20, 2018 12:43 am

I still receive the same error again. I have tried many solutions but no luck.
I tried to run via cmd the sql EXE file along with the configuration file where it is not in the same directory (just refer to it using whole path), it extracted and installed silently successfully. So I expect the problem with Advanced Installer.

I couldn't yet figure out where is the problem. Please help. Attached the error message.
2018-07-19_063830.jpg
2018-07-19_063830.jpg (79.57KiB)Viewed 13736 times

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Install SQL express 2014 with configuration file

Fri Jul 20, 2018 8:57 am

Hello,

Can you try to change the installation command line from

Code: Select all

/q /ConfigurationFile=[WindowsVolume][prerequisites]\SQL Server Express 2014\ConfigurationFile.ini
to

Code: Select all

/q /ConfigurationFile=[WindowsVolume]prerequisites\SQL Server Express 2014\ConfigurationFile.ini
and see if this helps ?

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

wopms6
Posts: 6
Joined: Tue Jul 10, 2018 5:16 am

Re: Install SQL express 2014 with configuration file

Fri Jul 20, 2018 9:21 am

Hi Catalin,

Yes I tried what you have suggested but there is no difference. I have attached a log file.

Regards,
Wopms6
Attachments
package.log
(26.41KiB)Downloaded 330 times

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Install SQL express 2014 with configuration file

Mon Jul 23, 2018 3:41 pm

Hello,

I am not sure why you encounter this behavior.

Attached you have a .aip (project file) which installs Microsoft SQL Server 2014 Express Sp1 as a prerequisite
sql install as prerequisite Wopms6.aip
(20.44KiB)Downloaded 415 times
and its configuration file
config.ini
(4.76KiB)Downloaded 449 times
Here is the link from where you can download the Microsoft SQL Server 2014 Express SP1.

After downloading the prerequisite, change the path from "Setup Files" tab in the "Prerequisites" page to the path where the prerequisite was downloaded.

If this still does not help, please send us the .aip (project file) and the necessary resources to reproduce this behavior by e-mail at support at advancedinstaller dot com so we can investigate its settings.

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

SZLMCL
Posts: 26
Joined: Mon Nov 16, 2020 2:18 pm

Re: Install SQL express 2014 with configuration file

Mon Nov 16, 2020 2:29 pm

Catalin wrote:
Tue Jul 10, 2018 9:08 am
Hello and welcome to our forums,

What you are trying to do here is to actually add SQL Express 2014 as a prerequisite for your vb.net application.

This is a step-by-step explaination on how you can achieve that:

1) Presuming that you have added all the other files, we can continue with configuring the SQL Express 2014 as a prerequisite. First thing you have to do is to go to "Prerequisites" page from the "Requirements" group.

2) Now add your prerequisite as a "Pre-Install" prerequisite. In order to achieve this, right click on "Pre-Install" -> "New Package Prerequisite" -> select your SQL Express 2014 package. Please keep in mind that "Pre-Install" prerequisites are handled by our EXE boostraper, so the build will automatically convert to "Single EXE setup (resources inside)" package type.
2.1) I would suggest that you use our predefined prerqeuisites since they are already tested and well configured.

3) Now that we have added the prerequisite, we have to add the configuration file as well. Since "Pre-Install" prerequisites are packages that are installed before the MSI is launched, we can't add it in "Files and Folders" page. We have to add it as an "Additional file" in the prerequisite "Setup Files" tab. In order to achieve this, you can go to "Prerequisites" page -> click on your prerequisite -> click on "Setup Files" tab -> click on "Add files..." button and add your configuration file.

4) Now we have to access the configuration file through a command line. To do this, we have to go to "Setup Files" tab, and in "Install Command Lines", we have to add the command line like as in the example below: :

Code: Select all

/ConfigurationFile=[WindowsVolume]SomeFolder\YourConfigurationFile
where "[WindowsVolume]" is a predefined property which stores the value "C:\" and "SomeFolder" is the folder which contains your configuration file. You have to configure this path so it will be the path to your configuration file. For more
information about this, you can check our "Paths of the folders in the "Files and Folders" Page" article.

5) For more information about prerequisites "Setup Files" tab, you can check our "Prerequisites Setup FIles Tab" article.

Hope this helps!

If you have any further questions or doubts, don't hesitate to contact me and I'll gladly assist.

Regards,
Catalin
Dear Catalin,

The step 4. is not clear for me. We add the configuraiton file to the Additional Files section. After the installation starts the SQL installer not find the configuration file. We cannot set absolute path for the configuration file like in your example (C:\Users\catalin\Desktop\config.ini) because this will be different in every computer.

I think the second problem that the SQLEXPR_x64_ENU.exe not accept any parameters. This is only a package. After we extract this package we will get the setup.exe file and we need pass these parameters to this setup.exe file.

If I add the configuration file to the Additional Files, what will be the path, that I can set as a parameter after the setup.exe call (not after the SQLEXPR_x64_ENU.exe call).

I think the SETUP.EXE and the configurationfile.ini needs to be extacted to the same temporary folder during the prerequsities installation.

Thank you very much fot help!

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Install SQL express 2014 with configuration file

Tue Nov 17, 2020 4:08 pm

Hello and welcome to our forums,
After the installation starts the SQL installer not find the configuration file. We cannot set absolute path for the configuration file like in your example (C:\Users\catalin\Desktop\config.ini) because this will be different in every computer.

If I add the configuration file to the Additional Files, what will be the path, that I can set as a parameter after the setup.exe call (not after the SQLEXPR_x64_ENU.exe call).
The additional file is exctracted in the same place where the prerequisites are extracted. The path can be found in "Prerequisites" page --> click on "Packages" --> "Download/Extraction folder" and its' default path is:

Code: Select all

[AppDataFolder][|Manufacturer]\[|ProductName]\prerequisites
Packages.png
Packages.png (151.9KiB)Viewed 11642 times
Extraction.png
Extraction.png (209.87KiB)Viewed 11642 times
I think the second problem that the SQLEXPR_x64_ENU.exe not accept any parameters. This is only a package. After we extract this package we will get the setup.exe file and we need pass these parameters to this setup.exe file.
For more information about this, please refer to the following How-To I've written some time ago:

Install SQL Server 2017 Silently/with BasicUI

There, I've mentioned that:
One very important command line switch here is the following: "/x:C:\ExtractionFolder". Since the "SQLEXPR_x64_ENU" is a self-extracting executable, it will always ask for the location where the "setup.exe" should be extracted.
Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

SZLMCL
Posts: 26
Joined: Mon Nov 16, 2020 2:18 pm

Re: Install SQL express 2014 with configuration file

Tue Nov 17, 2020 4:26 pm

Thank you very much for detailed description. Today I discover lot of things, and the result is same as yours.

One another thing: the SQL installer extracts the files to random folder (sometimes to the same path who the exe is located, sometimes to a GUID folder to root). (My first try was to place the installer files and ini file to same folder, but this did not work for the above reason.).

Finally I my working scenario is this:
sql.png
sql.png (42.17KiB)Viewed 11641 times

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Install SQL express 2014 with configuration file

Tue Nov 17, 2020 4:35 pm

You are always welcome!

Also, thank you for sharing your solution with us. I am sure this will be of help for further users facing a similar scenario.

I am glad everything works as expected now!

If you have any other questions, please do not hesitate to contact me and I'll gladly assist.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”