The installation of client tools in sql 2005 fails with error 1722

Recently we encountered an issue while installation of client tools in sql 2005, so I would like to share the same in the following blog

Problem Description

The installation of the Client tools in SQL Server 2005 fails with the following error messages:
<<Summary.txt>>

Machine : <MachineName>
Product : Workstation Components, Books Online and Development Tools

Error : There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.

--------------------------------------------------------------------------------
Machine : <MachineName>
Product : Microsoft SQL Server 2005 Tools
Product Version : 9.00.1399.06
Install : Failed
Log File : C:\Program Files (x86)\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0003_<MachineName>_Tools.log
Error Number : 1603
<< SQLSetup0003_<MachineName>_Tools.log >>

Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.

Action SqlWbSetup.5F46584E_060D_4BCB_ADEE_BD15A7BFCC2A, location: C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\SqlWb.exe, command: /setup
MSI (s) (B4:FC) [21:25:57:218]: Executing op: Header(Signature=1397708873,Version=301,Timestamp=948021846,LangId=1033,Platform=0,ScriptType=2,ScriptMajorVersion=21,ScriptMinorVersion=4,ScriptAttributes=3)
MSI (s) (B4:FC) [21:25:57:218]: Executing op: DialogInfo(Type=0,Argument=1033)
MSI (s) (B4:FC) [21:25:57:218]: Executing op: DialogInfo(Type=1,Argument=Microsoft SQL Server 2005 Tools)
MSI (s) (B4:FC) [21:25:57:218]: Executing op: RollbackInfo(,RollbackAction=Rollback,RollbackDescription=Rolling back
action:,RollbackTemplate=[1],CleanupAction=RollbackCleanup,CleanupDescription=Removing backup files,CleanupTemplate=File: [1])
MSI (s) (B4:FC) [21:25:57:218]: Executing op: RegisterBackupFile(File=C:\Config.Msi\6c9e91.rbf)
MSI (s) (B4:FC) [21:25:57:218]: Executing op: RegisterBackupFile(File=C:\Config.Msi\6c9e92.rbf)
Property(S): InstallNgenTicks = 750000

Property(S): HxDs_Tmp_3643236F_FC70_11D3_A536_0090278A1BB8 = C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Hx542.tmp
Property(S): HxDs_Tmp_Hash_3643236F_FC70_11D3_A536_0090278A1BB8 = B40B0DC6C3C19C68E0101E0E2A647F0C3A18F6
Property(S): SOURCEDIR = F:\SetupProperty(S): SourcedirProduct = {BCCEA237-5D77-4B63-B233-A2D1A9896434}
MSI (s) (B4:FC) [21:26:15:890]: Note: 1: 1729
MSI (s) (B4:FC) [21:26:15:890]: Product: Microsoft SQL Server 2005 Tools -- Configuration failed.
MSI (s) (B4:FC) [21:26:15:921]: Cleaning up uninstalled install packages, if any exist
MSI (s) (B4:FC) [21:26:15:921]: MainEngineThread is returning 1603
MSI (s) (B4:64) [21:26:16:046]: Destroying RemoteAPI object.
MSI (s) (B4:D8) [21:26:16:046]: Custom Action Manager thread ending.
=== Logging stopped: 4/1/2009 21:26:15 ===
MSI (c) (D4:C8) [21:26:16:125]: Decrementing counter to disable shutdown. If
counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (D4:C8) [21:26:16:125]: MainEngineThread is returning 1603
=== Verbose logging stopped: 4/1/2009 21:26:16 ===

Resolution (which worked in my case) ---- (See Section 2 for another resolution for the same problem)

A similar issue is blogged by tara Jana at this link but that resolution didn’t help in my case as the required dll’s were present in my case.

Setup kept on failing at the point when it tries to setup sqlwb.exe . Fortunately , we performed the installation in following steps and were able to successfully install client tools :

1. Run the Client tools setup from SQLrun_tools.msi and when the feature selection screen comes, select one Client component at a time and EXCLUDE Management Tools to be installed at the end.

2. Follow any sequence ( like first select Only BIDS under Client Tools Selection Screen.. Install it .... after that run the Setup again->SQLRun_tools.msi and this time select Legacy components.. and so on... )

3. After all the other Client Components were installed, INSTALL THE MANAGEMENT TOOLS by running the SQLRun_tools.msi setup.

Client tools setup should succeed now.

4. Although exact reason is unknown at this time, I guess this could be a timing issue as the required DLL's or resource files are not there for the management tools to complete.

Prashant Kumar
SE, Microsoft Sql Server.

Reviewed by

Tara Jana
Sr. SE, Microsoft Sql Server

 

=====================================================================================================

Another cause of the failure of the Workstation Tools and Components with the same error 1722 is explained below

Also from <<SQLSetup0003_<MachineName>_Tools.log >>, you would see something like below:-

MSI (s) (88:DC) [11:52:18:843]: Product: Microsoft SQL Server 2005 Tools (64-bit) -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action SqlWbSetup.5F46584E_060D_4BCB_ADEE_BD15A7BFCC2A, location: E:\Program Files\Microsoft SQL Server (x86)\90\Tools\Binn\VSShell\Common7\IDE\SqlWb.exe, command: /setup

Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action SqlWbSetup.5F46584E_060D_4BCB_ADEE_BD15A7BFCC2A, location: E:\Program Files\Microsoft SQL Server (x86)\90\Tools\Binn\VSShell\Common7\IDE\SqlWb.exe, command: /setup

MSI (s) (88:DC) [11:52:18:906]: Executing op: Header(Signature=1397708873,Version=301,Timestamp=985816634,LangId=1033,Platform=589824,ScriptType=2,ScriptMajorVersion=21,ScriptMinorVersion=4,ScriptAttributes=1)

MSI (s) (88:DC) [11:52:18:906]: Executing op: DialogInfo(Type=0,Argument=1033)

MSI (s) (88:DC) [11:52:18:906]: Executing op: DialogInfo(Type=1,Argument=Microsoft SQL Server 2005 Tools (64-bit))

MSI (s) (88:DC) [11:52:18:906]: Executing op: RollbackInfo(,RollbackAction=Rollback,RollbackDescription=Rolling back action:,RollbackTemplate=[1],CleanupAction=RollbackCleanup,CleanupDescription=Removing backup files,CleanupTemplate=File: [1])

MSI (s) (88:DC) [11:52:18:906]: Executing op: RegisterBackupFile(File=C:\Config.Msi\11b16d.rbf)

MSI (s) (88:DC) [11:52:18:906]: Executing op: RegisterBackupFile(File=C:\Config.Msi\11b16f.rbf)

MSI (s) (88:DC) [11:52:18:906]: Executing op: RegisterBackupFile(File=C:\Config.Msi\11b170.rbf)

MSI (s) (88:DC) [11:52:18:906]: Executing op: RegisterBackupFile(File=C:\Config.Msi\11b171.rbf)

MSI (s) (88:DC) [11:52:18:906]: Executing op: RegisterBackupFile(File=C:\Config.Msi\11b172.rbf)

MSI (s) (88:DC) [11:52:18:906]: Executing op: ActionStart(Name=DevenvSetup.F7D3EDE9_518D_4237_9DC7_C0BDD566BC57,,)

.

.

MSI (s) (88:DC) [11:53:12:532]: Product: Microsoft SQL Server 2005 Tools (64-bit) -- Installation failed.

MSI (s) (88:DC) [11:53:12:579]: Cleaning up uninstalled install packages, if any exist

MSI (s) (88:DC) [11:53:12:579]: MainEngineThread is returning 1603

MSI (s) (88:54) [11:53:12:689]: Destroying RemoteAPI object.

MSI (s) (88:A0) [11:53:12:689]: Custom Action Manager thread ending.

=== Logging stopped: 6/2/2009 11:53:12 ===

MSI (c) (94:48) [11:53:12:814]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1

MSI (c) (94:48) [11:53:12:814]: MainEngineThread is returning 1603

=== Verbose logging stopped: 6/2/2009 11:53:12 ===

Setup kept on failing at the point where it says "Removing Backup Files". Hence we performed the following steps and were able to successfully the install client tools :

1) Run the Client tools setup from SQLrun_tools.msi and when the feature selection screen comes, select only the connectivity components and exclude everything else. This will install successfully and you will see the workstation components listed as the common components in Add\Remove programs when you click on Remove for SQL Server 2005.

2) After this, uninstall the workstation components from Add\Remove Programs and launch the setup one more time and this time only select the Management Tools .This will give the following error during the setup:-

--------------------------

Microsoft SQL Server Management Studio

---------------------------

The file C:\WINDOWS\Microsoft.NET\Framework\\mscorlib.tlb could not be loaded. An attempt to repair this condition failed because the file could not be found.

3) The reason behind installing connectivity components first and later uninstalling is, if you directly run the Management Tools, it would fail with the following error and setup would not succeed, and there is no way you can move forward.

<<There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.>>

4) But when you uninstall the connectivity components, giving it a clean "un-installation" and then install the Management Tools, you would notice that setup would give the following error but it won’t stop and rather it shows as successful. Also SSMS gets installed but on launching it, you will get the same error as below:-

<<The file C:\WINDOWS\Microsoft.NET\Framework\\mscorlib.tlb could not be loaded. An attempt to repair this condition failed because the file could not be found>>

5) Now here is the trick. If you go the registry and locate the following key, you would see TlbAutoRepair\mscorlib.tlb has been created under the following Hive:-

<<HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\Shell>>

Please note that, if you are installing, SQL Server 2005 on 64-bit operating systems, the above registry key would be under wow6432Node as follows:-

<<HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server\90\Tools\Shell>>

7) Click on mscorlib.tlb and on right hand side pane, locate TlbPath and double click on it to edit the value

8) In the Value data box, replace %CLRVERSION% with v2.0.50727. Note The value v2.0.50727 indicates the version of the .NET Framework that the original release version of SQL Server 2005 uses.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Before making any change to the registry please take a full backup of the entire registry. Use Registry Editor at your own risk, else you can contact Microsoft support.

9) Exit the registry editor and uninstall the workstation components again from Add\Remove Programs

10) Launch the setup and this time choose the entire workstation component and you would see that this installs cleanly without any error. Even the SSMS launches successfully.

You can also refer the KB https://support.microsoft.com/kb/918685.

Although the, exact reason is unknown at this time, I guess it could due the fact that path of the Mscorlib.tlb file is incorrectly interpreted during the Setup process.

Depinder Kaur
SE, Microsoft Sql Server

Reveiwed By

Sudarshan Narasimhan
Technical Lead, Microsoft Sql server

&

Sourabh Agrawal
Technical Lead, Microsoft Sql Server