vdrake
Posts: 12
Joined: Tue Aug 17, 2021 3:25 am

Feature based prerequisite not installing with 18.9.1

Fri Dec 03, 2021 5:01 pm

We deploy the Visual Studio 2019 C++ runtime library with our product as a feature-based prerequisite.
After upgrading from 18.8.1 to 18.9.1, the runtime will not install. The end-user receives this error message:
redistribute-failure.png
redistribute-failure.png (106.22KiB)Viewed 4460 times
In the failure case, the AI_VerifyPrereq is returning '3' whereas it returns '1' for the 18.8.1-built installer:

Code: Select all

MSI (s) (1C:A0) [19:58:06:714]: Doing action: AI_VerifyPrereq
Action start 19:58:06: AI_VerifyPrereq.
MSI (s) (1C:18) [19:58:06:714]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIA439.tmp, Entrypoint: VerifyPrereq
CustomAction AI_VerifyPrereq returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 19:58:36: AI_VerifyPrereq. Return value 3.
Anyone have some ideas what might be going wrong?

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

Re: Feature based prerequisite not installing with 18.9.1

Fri Dec 03, 2021 5:30 pm

Hello,

This message is displayed when the second check of the prerequisite is done.

Basically this check verifies whether the condition set in "Prerequisites" page --> your prerequisite --> "Install Conditions" tab is true and, if not, returns the error in your screenshot.

The above check is only done when the "Continue with the main installation even if prerequisite is not installed" option is unchecked for your prerequisite ("Properties" tab).

However, I do not see how this would differ between two versions of Advanced Installer, so I would say the fact that you upgraded is not really the culprit here.

If possible, could you please create two sample projects that reproduce this and forward them to me by email at support at advancedinstaller dot com? Here are the files I would need:

- the .AIP file that does not reproduce this (18.8.1)

- the .AIP file that does reproduce this (18.9.1)

- a download link for the setup built with version 18.8.1

- a download link for the setup built with version 18.9.1

We do not have that specific prerequisite in our predefined list from what I can see, so I would assume you are adding it manually. Perhaps, you did not set the condition correctly.

You can find more information about prerequisite's install criteria in the following article:

Prerequisite install detection criteria - How to create one

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

vdrake
Posts: 12
Joined: Tue Aug 17, 2021 3:25 am

Re: Feature based prerequisite not installing with 18.9.1

Fri Dec 03, 2021 7:19 pm

Thank you for the reply.

Yes, you're correct: We have added this prerequisite manually as a feature-based prerequisite.

Unfortunately, I cannot reproduce the issue with a new project; both 18.8.1 and 18.9.1 successfully launch the prerequisite installer with a new project.

I've copied the prerequisite condition directly from my production installer, which looks up a registry value to determine whether the C++ runtime library is required, like this:
prerequisite-registry-value.png
prerequisite-registry-value.png (48.26KiB)Viewed 4452 times
Without the C++ runtime installed, this condition evaluates to FAILURE, as expected:
prerequisite-registry-value-test-expected-failure.png
prerequisite-registry-value-test-expected-failure.png (28.08KiB)Viewed 4452 times
I don't think the prerequisite condition is the problem. The prerequisite seems to have either not been run or failed. Please see the log snippet I provided in the original post.

Do you think the AI_VerifyPrereq action returning '3' in the failure case and '1' in the success case is relevant?

vdrake
Posts: 12
Joined: Tue Aug 17, 2021 3:25 am

Re: Feature based prerequisite not installing with 18.9.1

Fri Dec 03, 2021 8:05 pm

I'm doing some more comparison between the success and failure logs. In the failure case, the AI_InstallPrereq action is extremely short:

Code: Select all

MSI (c) (60:94) [13:52:28:115]: Doing action: ProgressDlg
Action start 13:52:28: ProgressDlg.
Action ended 13:52:28: ProgressDlg. Return value 1.
MSI (c) (60:94) [13:52:28:193]: Doing action: AI_DownloadPrereq
Action start 13:52:28: AI_DownloadPrereq.
MSI (c) (60:CC) [13:52:28:250]: Invoking remote custom action. DLL: C:\Users\vince\AppData\Local\Temp\MSI3ECD.tmp, Entrypoint: DownloadPrereq
AI_DownloadPrereq: Entering Install::ReadAndDownload
AI_DownloadPrereq: Number of prerequisites to download: [ 0 ]
Action ended 13:52:28: AI_DownloadPrereq. Return value 1.
MSI (c) (60:94) [13:52:28:300]: Doing action: AI_ExtractPrereq
Action start 13:52:28: AI_ExtractPrereq.
MSI (c) (60:D4) [13:52:28:345]: Invoking remote custom action. DLL: C:\Users\vince\AppData\Local\Temp\MSI3F3C.tmp, Entrypoint: ExtractPrereq
Action ended 13:52:28: AI_ExtractPrereq. Return value 1.
AI_InstallPrereq: START ProcessCmdLine
AI_InstallPrereq: START ProcessFullCmdLine
AI_InstallPrereq: END ProcessFullCmdLine
AI_InstallPrereq: NOT Msi Prerequsite
AI_InstallPrereq: mProcessedCmdLine=
AI_InstallPrereq: mApplicationPath=Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.30.30704\VC_redist.x64.exe
AI_InstallPrereq: END ProcessCmdLine
MSI (c) (60:94) [13:52:28:486]: PROPERTY CHANGE: Adding AI_MISSING_PREREQS property. Its value is 'Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.30.30704'.
MSI (c) (60:94) [13:52:28:499]: Note: 1: 2205 2:  3: AI_TempFile 
MSI (c) (60:94) [13:52:28:501]: Note: 1: 2228 2:  3: AI_TempFile 4: SELECT `Property` FROM `AI_TempFile` 
MSI (c) (60:94) [13:52:28:503]: Note: 1: 2205 2:  3: AI_XmlLocator 
MSI (c) (60:94) [13:52:28:505]: Note: 1: 2228 2:  3: AI_XmlLocator 4: SELECT `Property` FROM `AI_XmlLocator` 
MSI (c) (60:94) [13:52:29:072]: Note: 1: 2205 2:  3: AI_ChainedPackage 
MSI (c) (60:94) [13:52:29:078]: Note: 1: 2228 2:  3: AI_ChainedPackage 4: SELECT `ChainedPackage` FROM `AI_ChainedPackage` 
=== Verbose logging started: 12/3/2021  13:52:29  Build type: SHIP UNICODE 5.00.10011.00  Calling process: C:\dev\master2\cerberus\Installers\Advanced Installer\Projects\Cerberus FTP Server x64\Setup Files\CerberusInstall64.exe ===
One notable difference in the success case is the 'mApplicationPath' variable, which looks like a real path, whereas the failure case does not:

Code: Select all

AI_InstallPrereq: ADD PROP TO CMD: SHORTCUTDIR Value: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Cerberus FTP Server
AI_InstallPrereq: START ProcessCmdLine
AI_InstallPrereq: START ProcessFullCmdLine
AI_InstallPrereq: mRawCmdLine=/passive /norestart
AI_InstallPrereq: cmdArguments=/norestart
AI_InstallPrereq: commandLine=/passive
AI_InstallPrereq: Application path is invalid: /passive
AI_InstallPrereq: END ProcessFullCmdLine
AI_InstallPrereq: NOT Msi Prerequsite
AI_InstallPrereq: mProcessedCmdLine=/passive /norestart
AI_InstallPrereq: mApplicationPath=C:\Users\vince\AppData\Roaming\Cerberus LLC\Cerberus FTP Server\prerequisites\Visual C++ Redistributable for Visual Studio 2019\vc_redist.x64.exe
AI_InstallPrereq: END ProcessCmdLine
AI_InstallPrereq: START ProcessCmdLine
AI_InstallPrereq: START ProcessFullCmdLine
AI_InstallPrereq: mRawCmdLine=/silent /install 
AI_InstallPrereq: cmdArguments=/install 

vdrake
Posts: 12
Joined: Tue Aug 17, 2021 3:25 am

Re: Feature based prerequisite not installing with 18.9.1

Fri Dec 03, 2021 8:13 pm

Also notable is the AI_ExtractPrereq action. In the success case, it sets an AI_PREREQUIDIRS property...

Code: Select all

MSI (c) (7C:E4) [14:00:17:018]: Doing action: AI_ExtractPrereq
Action start 14:00:17: AI_ExtractPrereq.
MSI (c) (7C:D8) [14:00:17:065]: Invoking remote custom action. DLL: C:\Users\vince\AppData\Local\Temp\MSI662C.tmp, Entrypoint: ExtractPrereq
MSI (c) (7C!F8) [14:00:17:110]: PROPERTY CHANGE: Adding AI_PREREQDIRS property. Its value is 'C:\Users\vince\AppData\Roaming\Cerberus LLC\Cerberus FTP Server\prerequisites'.
Action ended 14:00:17: AI_ExtractPrereq. Return value 1.
Whereas in the failure case it does not...

Code: Select all

MSI (c) (60:94) [13:52:28:300]: Doing action: AI_ExtractPrereq
Action start 13:52:28: AI_ExtractPrereq.
MSI (c) (60:D4) [13:52:28:345]: Invoking remote custom action. DLL: C:\Users\vince\AppData\Local\Temp\MSI3F3C.tmp, Entrypoint: ExtractPrereq
Action ended 13:52:28: AI_ExtractPrereq. Return value 1.

vdrake
Posts: 12
Joined: Tue Aug 17, 2021 3:25 am

Re: Feature based prerequisite not installing with 18.9.1

Fri Dec 03, 2021 10:28 pm

Alright, I figured out the variable that causes the failure. We use LZMA compression in our installer.
lzma-compression-setting.png
lzma-compression-setting.png (40.8KiB)Viewed 4440 times
The Hello World installer I was testing with uses CAB files. When using LZMA compression, prerequisites successfully run in 18.8.1.
When I migrate the installer script to AI 18.9.1, the build no longer launches my prerequisite:
with-lzma-compression.png
with-lzma-compression.png (37.61KiB)Viewed 4440 times
I suspect this was introduced in 18.9.

I'll follow up with the reproduction script per your instructions

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

Re: Feature based prerequisite not installing with 18.9.1

Mon Dec 06, 2021 5:32 pm

Hello Vincent,

Thank you very much for your followup on this and for sharing the details with me.

Let's continue this over the email and I will update this thread as well as soon as we will reach a conclusive answer.

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

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

Re: Feature based prerequisite not installing with 18.9.1

Fri Dec 17, 2021 3:06 pm

Hello,

This has been fixed in version 19.0 of Advanced Installer, released on December 17th, 2021.

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

Return to “Common Problems”