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

exe, msi, and cab files

Hi, I have a possibly rather basic question. I started creating msi files, but when I added a language selection dialog, I had to use the exe type installer. I chose the "single EXE setup" package type because our customers don't want to be burdened with multiple files. This worked fine until some customers who have an IT department started to repackage our software, and complained about the missing msi file.

I found that I can use the /extract command line option to create the msi file from he exe type installer. Wen I double click the msi file it says it must be launched from a bootstrapper. No way to test...

Alongside the msi file, I also get a cab file. Now I wonder whether the cab file is required for repackaging the software, and whether there is a chance to have everything inside just one msi file, as it is the case when I coose the "single MSI" type.

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

Re: exe, msi, and cab files

Hello Hans,

First of all, please note that our EXE is simply a bootstrapper over the MSI and CAB files.

This EXE bootstrapper is needed to fulfill some more advanced requirements - such as the one you presented. Another one would be having pre-install prerequisites or more "fancy" themes that simply can not be rendered by the MSI technology.

In your case, you are indeed right that you can extract the MSI and CAB files out of the EXE bootstrapper using the /extract command.

However, as you have already noticed, you will not be able to test the MSI file due to a launch condition that is set for your setup. The launch condition can be found in the "Launch Conditions" page --> "System" --> scroll down --> "Package" --> "Run package only from EXE bootstrapper, prevent running from MSI package"

You can uncheck that launch condition, but some unexpected behavior may occur - such as the dialogs not being rendered correctly.

Hope this helps!

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

Re: exe, msi, and cab files

Hi Catalin,

it took me really long to return to this topic :) but thank you anyway, it works perfectly. Sometimes happiness is just a mouse click away...

Best
Hans
hsc
Posts: 71
Joined: Wed Mar 02, 2016 2:55 pm

Re: exe, msi, and cab files

Add-on questions:
1 - Am I right to assume that the cab file(s) must be in the same directory as the extracted msi file?
2 - Is there a way to avoid the cab files when extracting the msi file from an exe type installer? When creating an msi type installer, I can include the cab files in the msi file.
3 - A required prerequisite (VC++ Redistributales) is not installed automatically. Can I fix this?

Thanks
Hans
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: exe, msi, and cab files

Hello Hans,
1 - Am I right to assume that the cab file(s) must be in the same directory as the extracted msi file?
These two should be extracted in the same directory by our EXE bootstrapper so you shouldn't really worry about them.
2 - Is there a way to avoid the cab files when extracting the msi file from an exe type installer?
I'm afraid not as both the MSI and the CAB file are separately embedded in the bootstrapper.
3 - A required prerequisite (VC++ Redistributales) is not installed automatically. Can I fix this?
Of course!

Here, if the prerequisite is not installed automatically, it means the "install conditions" were not met (it's possible that it is already installed).

Could you please check that and let me know if that's the case?

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

Re: exe, msi, and cab files

Here, if the prerequisite is not installed automatically, it means the "install conditions" were not met (it's possible that it is already installed).
Hi Catalin,

I manually uninstalled all versions of the C++ runtime from the target machine. When I run the installer (msi extracted from the exe), during the "Verifying prerequisites" phase I get a message box saying "Visual C++ Redistributable for Visual Studio 2015-2022 x86 prerequisite was not correctly installed." When I continue, the installed application, unsurprisingly, cannot start until after I manually install VC_redist.x86.exe.

I thought it may have to do with the fact that VC_redist.x86.exe was extracted to a subdirectory, but moving this file into the same directory as the msi and cab files didn't change the behaviour.

The use case I am researching is this: We supply an exe type installers, but a few admins want to extract the msi file and repackage it into some other format used by their company's software distribution.

Best regards
Hans
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: exe, msi, and cab files

Hello Hans,
"Visual C++ Redistributable for Visual Studio 2015-2022 x86 prerequisite was not correctly installed."
Regarding this message, please note that this is thrown by your setup itself.

For the prerequisites, we do two checks:

1. before we install the prerequisite --> here, the condition you set in the "Install Condition" tab must be false, meaning the prerequisite is not installed on the machine and therefore we install it

2. after the prerequisite is installed --> here, we check once more the condition and now it must be true, meaning that the prerequisite was correctly installed on the machine

In your case, if you go to Control Panel after the installation of your setup, can you see VC++ Redistributable there? If so, it means the prerequisite was correctly installed.

We have this prerequisite in our predefined list. Is that how you added it, or perhaps you've added it manually?

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

Re: exe, msi, and cab files

Hi Catalin,

I created a log file today and see the following lines:
MSI (s) (9C:C8) [11:58:00:255]: Doing action: AI_VerifyPrereq
Action 11:58:00: AI_VerifyPrereq. Verifying prerequisites
Action start 11:58:00: AI_VerifyPrereq.
MSI (s) (9C:14) [11:58:00:255]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI3924.tmp, Entrypoint: VerifyPrereq
Action 11:58:00: AI_VerifyPrereq. Verifying prerequisites
Warning 4154. Visual C++ Redistributable for Visual Studio 2015-2022 x86 prerequisite was not correctly installed. Continue installation of MultiTrack Editor 32bit?
Action ended 11:58:07: AI_VerifyPrereq. Return value 1.
Does that provide the information with which you can give me more hints how to overcome the issue?

Regarding your second question, I added the prerequisite from the AI GUI and let AI download the file vc_redist.x86.exe, and then moved it to a different folder where it can be found during creation of the installer. During extraction from the exe installer, the vc_redist.x86.exe is extracted into the subfolder "Visual C++ Redistributable for Visual Studio 2015-2022". Note that the exe installer correctly installs the runtime.
hsc
Posts: 71
Joined: Wed Mar 02, 2016 2:55 pm

Re: exe, msi, and cab files

Update: I copied the file vc_redist.x86.exe to the same directory as the msi file, but that didn't change anything.
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: exe, msi, and cab files

Hello Hans,

That mostly happens because of the explanation I've given above:

- before the install, the condition must be false

- after the install, the condition must be true

In our case, the condition seems to not be true after the installation, so we would have to re-evaluate that.

Could you please let me know what condition you are using?

If you go to Control Panel, can you confirm the VC++ Redistributable was installed?

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

Re: exe, msi, and cab files

Hi Catalin,

I hope this screenshot answers your question.
install conditions
install conditions
2023-04-13_17h04_06.png (38.56 KiB) Viewed 12536 times
As for "can you confirm the VC++ Redistributable was installed?" - on the contrary, it was not installed, and I want to find out why and (more important) what I can do about it.

(The "normal" installation of the redist package starts with displaying copyright and usage conditions; in this case, it doesn't even do that.)

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

Re: exe, msi, and cab files

Hello Hans,

If possible, please send me a copy of your .AIP file by email at support at advancedinstaller dot com so I can investigate its settings.

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

Re: exe, msi, and cab files

Thank you Catalin. It's in the email.
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: exe, msi, and cab files

You're always welcome, Hans!

I have replied to your email, let's continue the thread there until we reach a conclusion.

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

Re: exe, msi, and cab files

Thanks to Catalin, I was ale to solve the problem with a completely different approach. Rather than creating an exe type installer and extracting the msi from it, I now use two different builds in the Advanced Installer project - one to create the exe, and one to create the msi. This suits my needs even better :D

Hans

Return to “Common Problems”