The AppDeploy Library contains an extensive document library and hours of video presentations on system and application deployment topics Admin Script Editor is a powerful suite of scripting tools for Windows Administrators
Interpreting errors- what the different error codes mean and where to find out more about them Controlling logs– the different values and what the real difference is between a verbose and non verbose log Enabling Logging- there are a handful of ways to enable logging and we will briefly cover those Reading Logs– understanding the log files and the information presented.
Windows Installer Error 1603 – “A fatal error occurred during installation” = You need a log! Before discussing where and how to turn on logging, it is important to understand what can be logged… * Wildcard is to log all information except for “V”. To get it all, use “*V”
Verbose obviously logs more information. The hexadecimal values you see in parentheses indicate what process is performing the logged action. With the exception of Windows 9x/ME systems that run all actions as one process, Windows Installer runs installations as two distinct processes: client and server. The client process runs the UI in the user context (collects user information and displays the UI). The server process runs as a service and performs the main installation (executes the installation script). Both processes occur on the same computer and are logged to the same file. This code 2262 here (if we referred to our error list) indicates that the stream is not available– in other words, there are no LaunchConditions specified for this particular package. Not really an error, but just informational– without verbose logging, this is not even called to our attention.
When enabling logging from the command line, you start with whatever action you wish to perform (and log) such as install or uninstall. The MSI file in question and then for the logging value it is /l and then (with no space) what you want to log (voicewarmup). This /lv* gets us everything. Then add a space and provide the path and file name for the log file you wish to generate. The path you specify for the log file must exist or you will get a pop-up message that the log file could not be opened.
With many InstallShield setups you may find that they are wrapped within an executable. The good news from the command line is that you can still pass arguments into the embedded MSI with the /v argument. The /v argument must be the last InstallShield parameter on the command line. Though supported Windows Installer parameters may be passed through to the MSI package, no InstallShield command-line parameters can follow the /v argument. Although it was not really necessary in this example, I wanted to show that if you need to put quotes in the command line (such as when dealing with spaces) – because the /v argument itself is enclosed in quotes, you must precede any quotes with a backslash to “escape” them.
Some setups such as MS office, provide an INI file for the setup which you may modify to dictate the behavior of the installation. For office, this file is to be stored at the admin installation point in a subfolder named “setup”. There is even a Setup INI customization wizard to help you manage this file. There is a logging section and you can change the type value to reflect what it is you want logged. You can also specify a path for log files by adding a Path value to this logging section. If you modify the Setup.ini file in the Files\\Setup folder of your administrative installation, you do not need a custom command line. However, if you rename the modified Setup.ini file, or it is located in a location other than the Files\\Setup folder of your Office installation, use a command line that is similar to the following to reference the new settings file More: http://support.microsoft.com/kb/308279
If installing via group policy or if you want to log the installation of an advertised package (or first use feature) you don ’t have these command line options available. For these we can edit the registry or use group policy… The wildcard does not work well here, use VOICEWARMUP to get a good log.
The policy is located under computer configuration > administrative templates > windows components > Windows Installer – here you can set your logging control values we discussed earlier (voicewarmup) When set to run via policy (either by registry edit or policy edit) you do not have the ability to specify the path for the log file– they are generated in the %temp% folder with a randomly generated name that starts with MSI and ends with .LOG. If the setup is running via group policy with nobody logged on, the log file will appear in the windows/temp folder. So if you don ’t see it in your temp folder, check there.
Quite often one error will generate another and so forth. Therefore you may see several errors when you view a log file. It can sometimes be the case that the error returned in the end is not always the cause but may be the result of an earlier error. The error returned is often helpful, but the entries in a verbose log leading up to the error can sometimes be even more revealing. When searching this log– start from the top of the file an search for the word “error”. You may be used to seeing zero to indicate success; not here . A return value of 4 typically means that the action cannot be completed until the computer is restarted.
Now one very helpful tool to analyzing logs is WiLogUtil from Microsoft. This is a good segway into the other freely available tools you may make use of in troubleshooting problems so I ’ll take a quick time out from the log discussion to cover how to obtain these tools…
For administrators InstallScript adds an additional level of complication in the need for installation of the InstallScript Runtime. To ensure that the required InstallScript Runtime is available MSI packages that utilize it must be launched from an accompanying setup.exe which can perform a check and if necessary an installation/upgrade of InstallScript as well as any custom InstallScript code prior to proceeding with the call to the MSI package. This makes it difficult to deploy- particularly via Group Policy which requires an MSI directly. It also makes it difficult to customize as you cannot create a response transform with most tools (all request a target MSI which is launched, in this case an MSI that cannot be launched directly). Further, this can make it difficult to include the installation using any conflict detection/resolution utilities.
Any pop up messages (or would be pop up messages) appear in the Application Log
Any directories in the Directory table will be validated by the CostFinalize sequence. Any entries that do not start with a drive letter are seen as network paths. If you have a mapped drive or redirected folder listed and the package is running with no user logged on, these paths may be inaccessible. Clean up your Directory table.
In particular if you do not handle when a custom action will run, it may try to run during uninstall. If this will fail, then your uninstall will fail and rollback to a “installed” state when you try to remove it. To fix this you would need to edit the locally cached MSI in the Installer directory or use MSIZAP. The installer runs script custom actions directly and does not use the Windows Script Host. The WScript object cannot be used inside a script custom action because this object is provided by the Windows Script Host. Objects in the Windows Script Host object model can only be used in custom actions if Windows Script Host is installed on the computer by creating new instances of the object, with a call to CreateObject, and providing the ProgId of the object (for example "WScript.Shell"). Depending on the type of script custom action, access to some objects and methods of the Windows Script Host object model may be denied for security reasons.
Bob Kelly AppDeploy Library http://www.appdeploy.com/library Windows Vista community http://www.realtime-vista.com Author and editor for several books, articles and papers on the topics of scripting and desktop administration… http://www.bkelly.com
Interpreting Errors The errors reported by Windows Installer are internal errors Keep a print out of the errors and their definitions. Microsoft Windows SDK (Vista) Documentation Win32 and COM Development > Administration and Management > Application Installation and Servicing > Windows Installer > Windows Installer Reference > Error Reference > Windows Installer Error Messages MSDN Library Online http://msdn2.microsoft.com/en-us/library/aa372835.aspx AppDeploy Online Reference http://www.appdeploy.com/msierrors/
Controlling Logs Logging Values (voice warm up) V = Verbose output O = Out of disk space messages I = Status messages C = Initial UI parameters E = All error messages W = Non-fatal warnings A = Startup of actions R = Action-specific records M = Out of memory or fatal exit information U = User requests P = Show properties + = Append to existing file ! = Empty the logging cache
Reading Logs Use the find function to locate instances of the keyword “error” Installer log return codes for logged actions 0 = Action not invoked; may not exist 1 = Completed actions successfully 2 = User terminated prematurely 3 = Unrecoverable error occurred 4 = Sequence suspended, to resume later
Windows Installer Tools WiLogUtl Windows Installer Cleanup Utility MSIZAP ORCA
Obtaining Tools Windows SDK for Windows Vista and .NET Framework 3.0 Runtime Components Choose: Developer Tools > Windows Development Tools > Win32 Development Tools http://download.microsoft.com/download/a/7/7/a7767f09-0136-4a96- a1f8-276bf0ee31fa/Setup.exe Windows Installer SDK (v1) http://www.microsoft.com/downloads/details.aspx?FamilyID=e96f8abc- 62c3-4cc3-93ad-bfc98e3ae4a3&DisplayLang=en AppDeploy.com http://www.appdeploy.com/techhomes/windowsinstaller.asp
WiLogUtl Helps make sense of Windows Installer Error logs
Windows Installer Cleanup GUI Interface for MSIZAP http://support.microsoft. com/kb/290301
MSIZAPEliminates all traces of Windows Installer data from the local machine T = remove all info for given product code P = remove In-Progress key S = remove Rollback Information A = for any specified removal, change ACLs to Admin Full Control W = perform removal for all users (default is for current user only) M = remove managed patch registration info G = remove orphaned cached Windows Installer data files for all users L = remove corrupted source list information ! = force a positive response to any verification prompts * = remove all Windows Installer folders and registry keys; adjust shared DLL counts; stop Windows Installer service /nologo = Do not display the logo message. This should be the last option
ORCA More like the WordPad vs. the Notepad of Windows Installer Editors http://msdn.microsoft.com/library/default.asp?url=/library/en- us/msi/setup/orca_exe.asp Can be used to perform MSI validation Supports working with merge modules Transform creation Indicates any changes made by a transform
Common Errors Problems with Windows Installer MSI packages that require Setup.exe Understanding Application Log Entries Inaccessible Network Location Fatal Error During Installation Invalid Source Location Common Custom Action Problems
Broken Windows InstallerError 1719: “The Windows Installer service could not be accessed” Reregister the Windows Installer service msiexec /unregister msiexec /regserver Reinstallation or upgrade to latest
Dealing with InstallScript InstallShield Script (InstallScript) has many benefits for developers, but can be problematic for administrators due to requirement for setup.exe Deploy ISSETUP.MSI beforehand Remove the SETUP.EXE dependency Remove custom action that performs the check using a transform file Specify a public property (ISSETUPDRIVEN) at the command line
Application Log Entries Significant events are logged to the Application Event Log Products and components are often identified by GUID Lookup in Registry Run install from command line: msiexec /i <GUID>
Inaccessible Network LocationError 1606: “The feature identifier is not registered.” Network location cannot be accessed The CostFinalize action verifies all potential install folders in directory table Inadvertent entries Entries that do not start with a drive letter Roaming profile location on network in unavailable share
Fatal Error During InstallError 1603: “A fatal error occurred during installation” Create verbose log to see actual problem One common cause: InstallShield Script DCOM security 1: Event E3250601 is created 1: GetInstallDriver, Can not find InstallDriver in ROT table, Return code = 0x800401e3 1: [GUID] 1: ISMsiServerStartup Failure, Failed to create InstallDriver, Error = 0x8000401a Action ended ISMsiServerStartup. Return Value 1603
Invalid Source LocationError 1603: “No valid source could be found for product ” Always know your source Use DFS share or consistently available network drive Beware of self extracting packages!
Common CA Problems Windows Script Host is not available WScript.CreateObject WScript.Quit WScript.Sleep WScript.Echo Know your exit codes (any non-zero return is failure and will result in rollback)
Reference Materials Microsoft How to use a setup log file to troubleshoot setup problems in Office http://support.microsoft.com/kb/826511 AppDeploy Windows Installer Error Forum http://www.appdeploy.com/messageboards/tt.asp?forumid=13 Windows Installer Error Reference http://www.appdeploy.com/msierrors Windows Installer Tech Home http://www.appdeploy.com/techhomes/windowsinstaller.asp
Contact Bob Kelly www.AppDeploy.com/Contact.asp