Generally there are two ways of invoking Windows Installer, a MSIExec command line call or an MSI API (MsiInstallProduct, MsiInstallProductEx, MsiReinstallProduct).
For the MSIExec case
For the MSI API case, consult the MSDN documentation on the API to determine which of the parameters determines success.
Where the problem gets interesting is when there is a failure as there is no automated way to determine with 100% accuracy what a source of an error has been. We have produced a best effort tool called wilogutl.exe that will highlight errors in the MSI. In this case best effort means there will be some false positives (cases where the error is inconsequential) and some negatives (cases where errors are known only by analyzing a combination of lines from the log along with the package).
As a windows installer dev in test, I found it most helpful to examine the verbose log file generated during the install and see what the MainEngineThread returns.