cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to capture Windows Installer error?

I am looking for a way to capture the Windows Installer error code within the .msi. i.e. the same error that is reported within the log file or within the ErrorDialog. The sole purpose of capturing the error is to report the actual failure code to SCCM (SCCM only reports 1603 as the failure code).
I have looked into Installer.LastErrorRecord but that is only for designated functions.
Any ideas?
(3) Replies
Can you give an example from the logfile of what you are trying to capture? MSIEXEC has a number of exit codes that it can return and SCCM should be able to easily report whatever was returned.
Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action TestError script error -2147024894, : Line 6, Column 4,
MSI (s) (30:24) [12:29:13:943]: Product: ErrorTest -- Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action TestError script error -2147024894, : Line 6, Column 4,

Action ended 12:29:13: InstallFinalize. Return value 3.

The Windows Installer errror i.e 1308, 1316, etc.
I can use the Event Log retrieve the Windows Installer error (InstallExecuteSequence -3). If Windows Installer is writing to the log I would think that I can somehow intercept/retrieve this information from the installing .msi.