sbaird
Posts: 57
Joined: Tue Sep 01, 2015 2:08 pm

MSI return code lost during silent install

When installing silently, the MSI return code is no longer returned by the bootstrapper at the command line. The bootstrapper always returns 0.

I believe this was broken by the changes made in 12.6 and 12.8 to cache the bootstrapper when running silently so that Enhanced UI would be available in maintenance mode (which is working, by the way).
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: MSI return code lost during silent install

Hello,

I tested the scenario when the installation fails but I cannot replicate the behavior. The EXE setup always return an error exit code when the installation fails.

Can you please send us a small buildable sample (AIP + its referenced files) or a detailed step by step test case we can use to replicate this issue?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sbaird
Posts: 57
Joined: Tue Sep 01, 2015 2:08 pm

Re: MSI return code lost during silent install

Turn on Enhanced UI.

Here is a sample project for you.

Notice this line in the bootstrapper log:

Code: Select all

2016-06-22 @09:07:18-Code returned to Windows by setup:0
Notice in the MSI log that "MainEngineThread is returning 1603" but still 0 is returned on the command line:

Code: Select all

MSI (s) (E8:F8) [09:07:18:764]: Product: Your Application -- Installation failed.

MSI (s) (E8:F8) [09:07:18:764]: Windows Installer installed the product. Product Name: Your Application. Product Version: 1.0.0. Product Language: 1033. Manufacturer: Your Company. Installation success or error status: 1603.

MSI (s) (E8:F8) [09:07:18:764]: Deferring clean up of packages/files, if any exist
MSI (s) (E8:F8) [09:07:18:764]: MainEngineThread is returning 1603
MSI (s) (E8:A0) [09:07:18:764]: RESTART MANAGER: Session closed.
MSI (s) (E8:A0) [09:07:18:764]: No System Restore sequence number for this installation.
=== Logging stopped: 6/22/2016  9:07:18 ===
MSI (s) (E8:A0) [09:07:18:764]: User policy value 'DisableRollback' is 0
MSI (s) (E8:A0) [09:07:18:764]: Machine policy value 'DisableRollback' is 0
MSI (s) (E8:A0) [09:07:18:764]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (E8:A0) [09:07:18:764]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (E8:A0) [09:07:18:764]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (E8:A0) [09:07:18:764]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
MSI (s) (E8:A0) [09:07:18:764]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
MSI (s) (E8:A0) [09:07:18:764]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (s) (E8:A0) [09:07:18:764]: Restoring environment variables
MSI (s) (E8:A0) [09:07:18:764]: Destroying RemoteAPI object.
MSI (s) (E8:78) [09:07:18:764]: Custom Action Manager thread ending.
MSI (c) (CC:70) [09:07:18:764]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c) (CC:70) [09:07:18:764]: MainEngineThread is returning 1603
=== Verbose logging stopped: 6/22/2016  9:07:18 ===

MSI (c) (7C:88) [09:07:14:334]: MsiOpenPackageEx is returning 0
MSI (c) (7C:88) [09:07:14:334]: MsiOpenPackage is returning 0
MSI (c) (7C:88) [09:07:14:334]: PROPERTY CHANGE: Adding AIEXTERNALUI property. Its value is '2'.
MSI (c) (7C:88) [09:07:14:334]: PROPERTY CHANGE: Adding AI_SETUPEXEPATH property. Its value is 'C:\Users\sbaird\Desktop\Your Application.exe'.
MSI (c) (7C:88) [09:07:14:334]: PROPERTY CHANGE: Adding SETUPEXEDIR property. Its value is 'C:\Users\sbaird\Desktop\'.
MSI (c) (7C:88) [09:07:14:334]: PROPERTY CHANGE: Adding EXE_CMD_LINE property. Its value is '/exenoui  /exelog "exelog.txt" /exenoupdates  /exelang 0 /noprereqs  /qn /l*v log.txt '.
MSI (c) (7C:88) [09:07:14:334]: PROPERTY CHANGE: Adding PRIMARYFOLDER property. Its value is 'APPDIR'.
MSI (c) (7C:88) [09:07:14:334]: PROPERTY CHANGE: Adding CLIENTPROCESSID property. Its value is '1660'.
MSI (c) (7C:88) [09:07:14:334]: PROPERTY CHANGE: Adding AI_IE_Ver property. Its value is '9'.
MSI (c) (7C:88) [09:07:14:334]: PROPERTY CHANGE: Adding AI_IE_MinorVer property. Its value is '0'.
MSI (c) (7C:88) [09:07:14:334]: PROPERTY CHANGE: Modifying AI_UNINSTALLER property. Its current value is 'msiexec.exe'. Its new value: 'C:\ProgramData\Caphyon\Advanced Installer\{BF4D124D-5D1C-49E9-9D48-D90080FB9E78}\Your Application.exe'.
MSI (c) (7C:88) [09:07:18:634]: Note: 1: 2205 2:  3: AI_ChainedPackage 
MSI (c) (7C:88) [09:07:18:634]: Note: 1: 2228 2:  3: AI_ChainedPackage 4: SELECT `ChainedPackage` FROM `AI_ChainedPackage` 
=== Verbose logging stopped: 6/22/2016  9:07:18 ===
Attachments
Your Application.aip
(21.88 KiB) Downloaded 593 times
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: MSI return code lost during silent install

Hello,

Thank you very much for the sent sample. Indeed, I can replicate the issue and it seems this is caused by our Enhanced User Interface feature. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention.

We will notify you right away the fix will be out.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
srg.goldman
Posts: 7
Joined: Sun Feb 17, 2013 3:15 pm

Re: MSI return code lost during silent install

Hi Daniel,
Currently i'm working with AI 13.0 and I think I'm facing the same problem,
Did you already fixed this issue?

Thanks.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: MSI return code lost during silent install

Hello,

This issue is still on our pending list. We will update this thread as soon as the fix will be available. We apologize for this inconvenience.

Thank you for your understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: MSI return code lost during silent install

Hello,

This was fixed in version 13.2 of Advanced Installer released on October 6th, 2016.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”