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!

edgsoccer
Posts: 32
Joined: Wed Jul 02, 2014 11:07 pm

I need the feature to attach a files to the installation

I need a feature to add folders and files to the installation without the need to install them or copy them to a temp location so i can run them. Example SQL 2014, I don't want to export all the files to a temp location then run the cmd file or bat to install it. I want to be able to install it from a button on my install like an action but i cant because the files need to be installed first. I want to be able to run the SQL 2014 installation from an attached folder. Can this be done?

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

Re: I need the feature to attach a files to the installation

Hello,

If you don't want to insert the SQL Server setup file into your installation package, then you can add it as an URL-based prerequisite. For example, you can go to "Prerequisites" page, select the "SQL Server Express 2014" predefined prerequisite and when prompted with "Download prerequisite and include in package?" dialog choose [No]. In this way, at install time if the prerequisite package isn't already installed it will be downloaded and then installed.

Let us know if this helped, otherwise please give us more details about the scenario you want to implement.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
edgsoccer
Posts: 32
Joined: Wed Jul 02, 2014 11:07 pm

Re: I need the feature to attach a files to the installation

I want to be able to add the sql folder as an attachment so i can run the exe from a command. so the files structure i will have the setup.exe and then a folder called attachments or SQl2014 and be able to run the sql.exe from there instead of having to have them right next to it like now but i cannot use it unless i install them first somewhere else first then i can run the sql.exe

right now i have to run to the installation and put the sql files on the temp folder then run the .exe but if i can just run it from the attached files then i would not have to waist time and space on coping the files somewhere else so i can run the .exe. and having it as a prerequisite woulnt help me.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: I need the feature to attach a files to the installation

Hello,

If you still don't want to add the SQL Server as a prerequisite, then in order to run its setup package on a button push (triggering it from a folder near the main setup.exe) you can place the SQL EXE setup into a folder residing near your main EXE package. Next, you can add a custom action without sequence which will launch the SQL EXE setup and will be executed on a button push.

Here are the steps to proceed:
1. go to "Custom Actions" page and add a "Launch File" custom action without sequence like this:

Code: Select all

File To Launch: [SETUPEXEDIR]SQL2014\SQLEXPR_x86_ENU.exe
2. go to "Dialogs" page and add the above custom action as execute custom action published event on a button
3. build your project as an EXE package type
4. alongside your build EXE package create a new folder (i.e. SQL2014) and copy the SQL EXE setup (i.e. SQLEXPR_x86_ENU.exe) in "SQL2014" folder
5. run your main EXE package

Please take a look on the "SETUPEXEDIR" property for your reference.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: I need the feature to attach a files to the installation

Hello,
i have to run to the installation and put the sql files on the temp folder then run the .exe but if i can just run it from the attached files then i would not have to waist time and space on coping the files somewhere else so i can run the .exe. and having it as a prerequisite woulnt help me.
For this you can try the following approach.
You can create a custom action that will load the related .EXE from the .MSI and will launch its installation without coping it on the disk. In this custom action you can implement the Dynamic forking technique.

You can try to add your .exe in the Binary table from Table Editor page of Advanced Installer. AIn your custom action you need to extract the .EXE from the Binary table too.
Please take a look on the Dynamic forking (Process hollowing) article with related information for hints and guidance.

For example, you can create your custom action as a custom action written in C# or a custom action written in C++.

Then you can go in the “Custom Actions” page and add a predefined Launch attached file custom action withot sequence. This type of custom action can execute an application (EXE or DLL) or run a script (VBScript or Java script). Also, the source file will be embedded in the MSI file but will not be deployed at install time with the other application files.

You can take a look on the How do I execute a custom action when a button is pushed? article with related information for hints and guidance.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”