oren
Posts: 11
Joined: Mon Sep 03, 2012 5:24 pm

Build MSI for silent installation

Hi,

I need to create an MSI for silent installation.

my requirements:
1. add to the package only one EXE file
2. The EXE file will auto run after install.
3. The entire process should be silent without user interaction.
4. The EXE file should be extracted to the same directory from where the MSI was started.

Current situation:
1. If 'Install Parameters > Limit to basic....' is not enabled, a wizard will show with only one button 'Finish' that once pressed, the EXE is extracted and auto ran as required.
2. If 'Install Parameters > Limit to basic....' is enabled, no wizard will show but the EXE file is extracted to a directory call APPDIR and it won't autorun.

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

Re: Build MSI for silent installation

Hello Oren,

Please keep in mind that if you are using the "Launch your application at the end of installation" option, then this is the normal behavior when the installation package is launched silently or with basic UI. In this case the "Finish Actions" will not be executed. However, in order to achieve what you want you can add, in "Custom Actions" page, a "Launch file or open URL" custom action with sequence after "Install Execution Stage -> Add Resources" action group like this:
  • Command: "[#file.exe]"
Also, the custom action should be scheduled as deferred with no impersonation.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
oren
Posts: 11
Joined: Mon Sep 03, 2012 5:24 pm

Re: Build MSI for silent installation

Hello Daniel,

I have done what you've described.
The result is that once running the MSI it will show only the progress and will run the attached application. and that is great.
The problem now is that the application is extracted to a sub-folder called APPDIR and its running from that folder.
I need the application to be extracted and started for the same folder from where the MSI is started from. (do not create a sub-folder call APPDIR).

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

Re: Build MSI for silent installation

Hello Oren,

In order to achieve what you want you can proceed like this:
- Go to "Install Parameters" page and add the following property:
  • Name: SOURCEDIR
    Value: Your Value
- Go to "Files and Folders" page create a property-based folder using SOURCEDIR property and add your file.exe in it.
- Go to "Table Editor" page and in the "InstallExecuteSequence" table add a new row like this:
  • Action: ResolveSource
    Condition: NOT Installed
    Sequence: 801
The ResolveSource action should be added in sequence after CostInitialize standard action.
- Build and run your project.

Please keep in mind that our "Table Editor" feature is available only in an "Enterprise" or higher project type.

Also, here's attached a sample, created using version 9.9 of Advanced Installer, which implements your scenario.
sample.zip
(6.32 KiB) Downloaded 401 times
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
oren
Posts: 11
Joined: Mon Sep 03, 2012 5:24 pm

Re: Build MSI for silent installation

Hello Daniel,

Your solution solved my issue. Also, thanks for the attached sample. it made it much easier to understand.
I appreciate your support.

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

Re: Build MSI for silent installation

You're welcome. I'm glad you got this working.

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

Return to “Building Installers”