Symantec Management Platform (SMP) Community

 View Only

Testing Solution MSIs 

May 25, 2010 07:23 PM

I have worked with many developers that have gotten lost trying to fix their installers.  This article is meant to be used as a starting point to help developers troubleshoot their installers with the various tools and techniques available.


The most common error

All solution installers contain a custom action that will prevent the MSI from installing when ran outside of the Symantec Installation Manager (SIM).  When a solution MSI is executed outside of SIM, the following error is displayed: "This MSI must be run by the installer framework.  Please rerun using the installer framework."

Symantec recommends for all Solutions to test how their install behaves through SIM.  In some cases, you may want to do a quick test outside of SIM.  To bypass the custom action wired into solution installers, you can use the SKIPAIM=1 flag from the command line.  

usage: 
                  msiexec /i <path to your msi file> SKIPAIM=1.
 

Troubleshooting MSI errors

During testing of your MSIs, you may encounter errors during the install, upgrade, or uninstall of  your product. Getting log information and validation your MSIs are key to troubleshooting MSI errors.  The easiest method to help determine why an MSI error occurred is to view the log information.   


Logging MSIs ran outside of SIM


If you are manually running the MSI from the command line, you can specify the /l*v flag.  The /l*v flag is used to write detailed logging information of an MSI package to disk.  

usage :
                  msiexec /i <path to your msi file> SKIPAIM=1 /l*v <path to write log file to>

 

Logging MSIs ran by SIM


SIM is not ran from the command line and can install multiple MSIs during the installation process.  Because of this, SIM has a different mechanism to log the same information that is logged when using the /l*v flag from the command line.  MSI logging through SIM is done with settings in the Registry.  When SIM is installed, it will create a registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Altiris\AIM\Configuration. Within this key there are logging options for install, repair and uninstalls.  These string values are :
  • MsiInstallLogging : Set this string value to a directory location where all MSI install log files will be saved to.  
  • MsiRepairLogging : Set this string value to a directory location where all MSI repair log files will be saved to.
  • MsiUninstallLogging : Set this string value to a directory location where all MSI uninstall log files will be saved to.
If the the directory location in the registry string values do not exist, SIM will create them.  If the value is an empty string, SIM will not perform any MSI logging.  Each MSI that is executed will have its logging information saved in a separate file.


Altiris Log Viewer

All Solution installers will contain configuration files that register a solution into the Symantec Management Platform (SMP).  During the install process, these files are imported into the CMDB via SDK APIs.  These APIs will log messages to the Altiris Log Viewer.  To ensure that your settings are properly getting placed into the CMDB, it is vital that you check your logs when an install is occurring.    Beginning with SMP 7.1.1571, the Altiris Log Viewer is accessible from the Start Menu under All Programs > Symantec > Diagnostics > Altiris Log Viewer.  This log viewer is a graphical user interface that reads log files stored at %programfiles%\Altiris\Notification Server\Logs.  This tool contains many features to search, sort and filter the log information to quickly diagnose problems.


Packaging log information recorded by SIM

If you encounter an issue during your install that requires additional assistance, you can pack the local SIM logs, SMP logs, file files, registry and install history information into one zip file.  This feature is available with SIM version 7.1.14 and greater.  To use this feature, from the Installed Products dialog in SIM, click Settings > Create support package.  The zip file will be placed in {INSTALL LOCATION}\Symantec Installation Manager\Support.


MSI ZAP

http://support.microsoft.com/kb/290301

MSI ZAP, or Microsoft Clean Up Utility is a utility created by Microsoft that allows you to remove Windows Installer information from your computer.  This tool is useful if you are unable to remove an MSI and need to clean up an environment.  This tool does not remove files that an MSI installs.  It will only remove the configuration information so that you can run the MSI once more.

If you have simply lost the MSI that you originally installed, you can use the MSI cache.  When an MSI is installed, the original MSI file is copied to the MSI cache at C:\Windows\Installer.  The MSI file names in this directory are obfuscated.  In order to locate your file, you can search this directory by file details such as Company, Description, an other files.

ORCA

http://support.microsoft.com/kb/255905

ORCA is another Microsoft graphical user interface utility which is available with the Windows Installer SDK. This utility allows you to directly edit MSI package files.  If you happen to notice errors during an install, it is often valuable to look at the MSI tables to verify your settings and perform really quick tests.  


ORCA also includes validation tools called Internal Consistency Evaluator (ICE) checks.  These checks can help ensure that your installer follows Microsoft Installer best practices.  You may also write your own ICE checks in .cub files to ensure that all your product's MSIs meet certain criteria for standardization purposes.  When an MSI fails to validate on an ICE check, ORCA will list them during the validation process.  Microsoft has provided a list of on their ICE Reference website to all their standard ICE validations with tips on how to correct failure.  Note: You will want to check your MSI for ICE Errors but you may not need to correct all the errors that you get.


Wise Installer for Windows

Wise Installer for Windows is distributed by the Altiris SDK Installer.  Though SMP 7.1 Solutions do not use Wise to create MSIs, you can use Wise tools for the same benefits that ORCA provides plus other features such as Diff tools to compare two MSI databases.  Wise also includes great help documentation on the Windows Installer framework.


Getting Help With Error Codes

http://msdn.microsoft.com/en-us/library/aa368542(VS.85).aspx

Microsoft keeps good reference material that describes MSI error codes and possible sources for errors. This material can be invaluable to help troubleshoot and resolve most errors that you encounter.>

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.