The SQL 2005 installer expects the installation media to be in a specific layout. If the directory structure is incorrect the error message you receive during setup is: "There was an unexpected failure during the setup wizard. You may review the setup logs and/or click the help button for more information."
The behavior I saw was that the SQL server itself would install, but the Management Studio installation failed.
This problem is most likely to occur if you start the SQL Server 2005 installation from a folder on a network share or on a hard disk when the folder was copied from the SQL Server 2005 installation CDs.
To work around this problem, set the folders in the correct layout for the SQL Server 2005 installation. [more]
The SQL Server 2005 installation uses the following two folders:
These two folders must be under the same level of a folder or the root folder of a drive. The names of these folders must be exactly Servers and Tools. The Servers folder contains all the files that are required to install major SQL Server 2005 components, such as database engine. The Tools folder contains tools components and Books Online for SQL Server 2005.