Tuesday, August 21, 2012

Exchange 2010 SP2 Roll Up 4 Does Not Install - Error Code 1603

Event 1024 MSiInstaller - Error code 1603

Update: Microsoft is asking customers who are having this issue to open a support case with Microsoft Technical Support.  They see random support calls related to this going back to Exchange 2007, but want to reproduce the issue with customers currently seeing this issue with Exchange 2010 SP2 UR4. 

See
http://support.microsoft.com/kb/319726 for MTS phone numbers in your area. 
I had an interesting problem installing Exchange 2010 SP2 Update Rollup 4 (UR4) on servers that have never had issues installing updates before.  When I tried to install SP2 UR4 on the Edge Transport or typical installation servers it would rollback the installation and log the following error in the application log:
Product: Microsoft Exchange Server - Update 'Update Rollup 4 for Exchange Server 2010 Service Pack 2 (KB2706690) 14.2.318.2' could not be installed. Error code 1603. Windows Installer can create logs to help troubleshoot issues with installing software packages.
Normally this issue us fixed by installing the Update Rollup from an elevated CMD prompt (see http://blog.c7solutions.com/2011/03/exchange-2010-update-rollups-and-error.html), but this time it still wasn't working.

I enabled MSI Installer logging as per http://go.microsoft.com/fwlink/?LinkId=23127 and dived into the setup logs.  I found the following error being logged in the ServiceControl.log:
[19:51:28] [Error] System.Management.Automation.ParseException: At C:\Program Files\Microsoft\Exchange Server\V14\Scripts\ManageScheduledTask.ps1:462 char:5
+                 return $success
+                 ~~~~~~~~~~~~~~~
Control cannot leave a finally block.
 
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
I examined the ManagedScheduleTask.ps1 script which apparently disables the 'Database One Copy Alert' scheduled task, but could not determine what the error is.  I also ran the script from EMS, which returned the same error.  Nothing showed up on the Interwebs other than a few references to PowerShell 3.0, which is not installed on these servers.

I finally resolved it by renaming the ManageScheduledTask.ps1 script to ManageScheduledTask.old and creating a new empty ManageScheduledTask.ps1 script.  The script must exist and return a non-error code when executed for the UR4 installer to work.  I renamed the script back when the installer finished.

This may be an esoteric problem, but I wanted to document it in case anyone else has the same problem.  If this does happen in your environment, please leave a comment below.  Thanks.

Follow Up (10/12/2012)
I've found several times so far that this happens to servers that have the Windows Management Framework 3.0 installed.  The RTW version is found at http://www.microsoft.com/en-us/download/details.aspx?id=29939.  The Windows Management Framework 3.0 includes PowerShell 3.0, which is not compatible with Exchange 2010 and explains why the ManageScheduledTask.ps1 script doesn't run properly.

Check the installed updates on the problem server for the Windows Management Framework 3.0 and try uninstalling it to see if it solves the problem.  The Framework allows you to manage servers remotely from the Windows Server 2012 Server Management Console.

Microsoft re-released the following updates to fix a code-signing issue that may affect some customers in the near future:
See the EHLO Blog article, Re-released Exchange 2010 and Exchange 2007 update rollups for more information.  The re-release of the these update rollups has no bearing on the script issue covered in this article, but I do recommend installing the re-released updates on your Exchange servers to prevent future code-signing issues.
9:02 AM