oz1cz
Posts: 17
Joined: Thu Oct 01, 2009 10:49 am

Keep MSI file when creating EXE file

I want to create an EXE setup file containing all the files to install.
However, I also want to be able to include the MSI file in anonther installation project.

Is there any way to create both a single-file EXE bootstrapper and an MSI file?

--
Claus
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Keep MSI file when creating EXE file

Hi Claus,

Yes, you can create a new MSI build in the Media page. This way a build will generate an EXE and the other one will generate a MSI.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
oz1cz
Posts: 17
Joined: Thu Oct 01, 2009 10:49 am

Re: Keep MSI file when creating EXE file

Thanks, Cosmin
charettepa
Posts: 4
Joined: Mon Mar 20, 2023 3:34 pm

Re: Keep MSI file when creating EXE file

building an EXE first generates the MSI
then deletes the MSI when the EXE is done
why can we not just keep the MSI and not delete it

have 2 builds results in double the time required to build and seems redundant

I am currently on 20.4.1

I have had the same issue in 18,19,20
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: Keep MSI file when creating EXE file

Hello,

In order to avoid that, you can simply use the "EXE with resources next to it" package type from "Builds" page.

Additionally, you can always extract the MSI out of the EXE using the "/extract" command line, e.g.:

Code: Select all

setup.exe /extract
Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
charettepa
Posts: 4
Joined: Mon Mar 20, 2023 3:34 pm

Re: Keep MSI file when creating EXE file

unfortunately when you do this
the cab is not part of the exe or the msi
resulting having to distribute multiple files

how can we get 2 complete single packages
1EXE 1MSI
we have a use case where we need both
at the moment the ony way to ddo this is to have 2 builds and tell it to "build all"
but this results in double the build time

its already creating the MSI with cab built in, before generating the exe
why can we not simply instruct it to "not delete" the MSI
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: Keep MSI file when creating EXE file

Hello,

The only way to achieve what you need is to have two builds, just as you mentioned.

When you build an EXE, the MSI must be embedded into it so you can make use of the EXE capabilities (e.g. pre-install prerequisites, much more modern UI, etc.).

If you want, you can also extract the MSI out of the EXE, as I previously mentioned.

If you are not using the EXE capabilities, you can extract the MSI out of the EXE file as I explained above.

In addition, you should also uncheck the "Run package only from EXE bootstrapper, prevent running from MSI package" option from the "Launch Conditions" page.

However, I would still suggest you go for two builds.

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

Return to “Building Installers”