hsc
Posts: 117
Joined: Wed Mar 02, 2016 2:55 pm

Extract msi from exe installer

Hi,

I want to find a way to have an exe installer and an msi installer which are really equivalent to each other, in a sense that I could use the exe to install, and the msi to uninstall, or vice versa. When I create an exe installer and an msi installer in the same Advanced Installer project, this seems not to work. So I found https://www.advancedinstaller.com/extra ... m-exe.html and started to work with the hints from that page.

The exe installer file is 97 MB big and the msi, created from the same project, is 93 MB. I understand the the exe installer has a bit added functionality which explains the difference.

First I used the "/extract" command line switch of the exe installer. This is what I found:
  • The extract-to directory must be created before the /extract operation is started, otherwise the directory specification is ignored.
  • The operation extracts 3 files: an msi file of 61 MB, a cab file of 7 MB, and the prerequisite file VC_redist.x64.exe of 24 MB. In total, these files are a bit smaller than the msi file which I created directly from the project.
Then I extract the content of the exe installer, using 7-zip. What I got is a single file of 19 kB with a name that comes from one of the merge modules used in the project. It is a file from which 7-zip can extract 5 files and a folder with a total of 16 kB data. Nothing is even remotely the size of the msi file.

Finally, I started the exe installer and found the extracted msi file in %APPDATA%\<vendor>\<product>\install, alongside a file "holder0.aiph" of 7 MB. The msi is 61 MB large which again is smaller than what I expect to see. Installation from this file didn't find the VC_redist.x64.exe prerequisite and finally complained about missing cab file.

Can you please comment on these items? Is there no way to extract a usable msi file from the exe installer?

I am using AdvancedInstaller 23.6.

Thank you, Hans
Catalin
Posts: 7794
Joined: Wed Jun 13, 2018 7:49 am

Re: Extract msi from exe installer

Hello Hans,

By default, when creating an EXE package, the following launch condition is automatically checked in the "Launch Conditions" page, under the "System" tab.
Screenshot_135.png
Screenshot_135.png (3.88 KiB) Viewed 6674 times

This is for an obvious reason, the one that you mentioned - the fact that the EXE bootstrapper adds an extra layer of features that can be used, such as:

- "before main package" prerequisites
- modern themes (rendered via the Enhanced User Interface feature)
- some custom dialogs (like the language selection one)
- etc.

If you use none of these features and you disable the launch condition, then you should be able to use both the EXE and the MSI interchangeably, via the "/extract" option from the EXE bootstrapper.
Screenshot_136.png
Screenshot_136.png (12.9 KiB) Viewed 6674 times

You could also use the "EXE setup with resources next to it" option from the "Builds" page.
Screenshot_137.png
Screenshot_137.png (8.99 KiB) Viewed 6674 times

Could you please let me know why you would need that, though? I mean both an MSI and an EXE?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hsc
Posts: 117
Joined: Wed Mar 02, 2016 2:55 pm

Re: Extract msi from exe installer

Hello Catalin,

thanks for the quick reply. The reason I want both exe and msi installers is that, for customers who buy a single license, the exe installer usually is more comfortable (although, to be honest, I couldn't tell why). Companies who purchase 100 seats or more on the other hand, prefer the msi type installer which they wrap into their own rollout procedures.

Why would I want to have exe and msi installers interchangeably? I was confused when I found out that I cannot ununstall the product with the msi installer and then remembered that I had used the exe installer to install it. (Both installers were created from the same project as two builds.)

The "Run package only from EXE..." checkbox I had never noticed before. Im my aip project, it is unchecked.

Let's close the topic for now. I can live with the way it is.

Regards, Hans
Catalin
Posts: 7794
Joined: Wed Jun 13, 2018 7:49 am

Re: Extract msi from exe installer

Hello Hans,

Thank you for your followup on this!

If you require any further assistance, do not hesitate to open a new thread and I will gladly assist. :)

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

Return to “Common Problems”