Return code - Advanced Installer Community
aeplengg
Posts: 76
Joined: Mon May 05, 2014 5:31 am

Return code

We have created the setup exe using adi v11.0. We want this exe to return the standard code like http://msdn.microsoft.com/en-us/library ... s.85).aspx
From exelog we found the setup exe is suppressing the return code by msi. What needs to be done to get the desired return code?

====== Starting logging of "D:\Workspaces\P50 Agile Configurator\bin\P50AgileConfiguratorSetup_0.12\P50AgileConfiguratorSetup.exe" ====
<< OS Version: MajorVersion: 6; MinorVersion: 3; BuildNumber: 9600; PlatformId: 2; CSDVersion: ; ServicePackMajor: 0; ServicePackMinor: 0; SuiteMask: 256; ProductType: 1; >>

2014-04-30 @08:34:08-Full command line:"D:\Workspaces\P50 Agile Configurator\bin\P50AgileConfiguratorSetup_0.12\P50AgileConfiguratorSetup.exe" /exelog log.txt
2014-04-30 @08:34:08-Command line to pass to MSI:
2014-04-30 @08:34:08-Extraction path set to:\\?\C:\Users\pglusinski\AppData\Roaming\Alstom Grid\P50 Agile Configurator 0.12.0.0\install\
2014-04-30 @08:34:08-Extraction path set to:\\?\C:\Users\pglusinski\AppData\Roaming\Alstom Grid\P50 Agile Configurator\prerequisites\
2014-04-30 @08:34:08-Maintenance mode:false
2014-04-30 @08:34:08-Detected Windows Installer version:5.0.9600.16384
2014-04-30 @08:34:08-Language used for UI:0-English (United States)
2014-04-30 @08:34:08-No prerequisite must be installed.
2014-04-30 @08:34:08-Available languages for UI:1033-English (United States)
2014-04-30 @08:34:08-Launching msiexec.exe with command line: /i "C:\Users\pglusinski\AppData\Roaming\Alstom Grid\P50 Agile Configurator 0.12.0.0\install\A966156\P50AgileConfiguratorSetup.msi" TARGETDIR="C:\Program Files (x86)\Alstom Grid\P50 Agile" /TEMPLATESDIR="." AI_SETUPEXEPATH="D:\Workspaces\P50 Agile Configurator\bin\P50AgileConfiguratorSetup_0.12\P50AgileConfiguratorSetup.exe" SETUPEXEDIR="D:\Workspaces\P50 Agile Configurator\bin\P50AgileConfiguratorSetup_0.12\" EXE_CMD_LINE="/exelog ""log.txt"" /exenoupdates /exelang 0 /noprereqs "
2014-04-30 @08:34:12-Return code of msiexec.exe:1602
2014-04-30 @08:34:12-Code returned to Windows by setup:-1
2014-04-30 @08:34:12-=====================End of Log=====================
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Return code

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

Please keep in mind that the EXE bootstrapper will always return the code returned by MSIExec.exe after running the main MSI, excepting the case when the installation is cancelled (the msiexec.exe return 1602 error code). When the installation is cancelled (msiexec.exe return 1602) the EXE bootstrapper returns -1. This is our EXE bootstrapper default behavior. Please take a look on "Return code" section of our "EXE setup file" user guide article.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aeplengg
Posts: 76
Joined: Mon May 05, 2014 5:31 am

Re: Return code

Hello,

Please provide a full list of error codes returned by adi supported in this case and how to test them?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Return code

Hello,

You'll find the full list of the msiexec.exe return codes in the "MsiExec.exe and InstMsi.exe Error Messages". When you are using an EXE package type (which contains an embedded MSI), then our EXE will have the following return codes:
  • -1, when the embedded MSI returns 1602
    the MSI return code, otherwise
In order to check the EXE return code you can use a BAT file like this:

Code: Select all

PathToSetup\setup.exe
echo Exit Code is %errorlevel%
pause
If you have any questions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”