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!

Oliver Paals
Posts: 7
Joined: Fri Apr 24, 2020 10:05 am
Location: Germany

Create MSI setup from NSIS setup

Hello,

I´m trying to create an MSI installer to install an application which needs an additional Postgres database.
I already created a NSIS installer package. Because with NSIS it is only possible to create Setup.exe files, I want to transfer this in an Setup.msi file.

The difficulty is, that the existing NSIS installer uses the 'postgresql-10.11-1-windows.exe' setup file provided by postgresql.org this needs certain parameters to run silently inside the NSIS installation. Target is, that the whole MSI installer can be executed completely silent and has all parameters to install postgres database on board.
The attempts I already made were:

- Using 'postgresql-10.11-1-windows.exe' as prerequisite
=> no silent installation possible

- Using 'postgresql-10.11-1-windows.exe' in a custom action of type 'Execute inline script code' to run a Visual basic script calling postgres setup with wshShell.Exec with the necessary installation parameters.
=> Postgres database is not properly installed

- Using the 'MSI from EXE(s)' assistant provided by AdvancedInstaller
=> First attempt: Resulting MSI file hangs in step 'Installing prerequisite software'
=> Second attempt: Resulting MSI fileshows dialog with "Gathering required information..." and nothing more

Thanks in advance
Oliver
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Create MSI setup from NSIS setup

Hello Oliver and welcome to Advanced Installer forums,
- Using 'postgresql-10.11-1-windows.exe' as prerequisite
=> no silent installation possible
I have tested this just now and everything worked as expected for me. The PostgresSQL was installed.

Since you need to have your main setup as an MSI, here is how we can achieve this:

- go to "Prerequisites" page

- add PostgresSQL as a "feature-based" prerequisite

- after doing so, select the prerequisite --> "Setup Files" tab

- in the "Install Command Line" fields, add the following:

Code: Select all

--mode unattended --unattendedmodeui none
The command line fields refer to the UI level of the main setup, e.g.:

- Full UI --> this means that the prerequisite will be launched with the specified command lines if the main setup is launched with full ui.

- Basic UI --> this means that the prerequisite will be launched with the specified command lines if the main setup is launched with basic ui.

- Silent (no UI) --> this means that the prerequisite will be launched with the specified command lines if the main setup is launched silently.

After doing so, simply build and run the setup.

Please note that the installation may take a while.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Oliver Paals
Posts: 7
Joined: Fri Apr 24, 2020 10:05 am
Location: Germany

Re: Create MSI setup from NSIS setup

Hello Catalin,

thank you very much for your quick and helpful answer.

After setting my project to enterprise licence, everything worked fine like you described!

Best regards
Oliver
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Create MSI setup from NSIS setup

You are always welcome, Oliver!

It's always my pleasure to help.

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

Return to “Building Installers”