.NET 3.5 Framework installation failed for component Microsoft .NET Framework 2.0a. MSI returned error code 1603

I ran into this when installing the 3.5 Framework on two Windows 2003 SP2 servers. .NET 3.5 installed with no problems on one, but failed on the other. The full error from the log was:

[03/28/08,17:08:09] Microsoft .NET Framework 2.0a: [2] Error: Installation failed for component Microsoft .NET Framework 2.0a. MSI returned error code 1603
[03/28/08,17:08:46] WapUI: [2] DepCheck indicates Microsoft .NET Framework 2.0a is not installed.

The server where the install succeeded showed this in Add/Remove Programs:

NET Framework 2.0 Service Pack 1
NET Framework 3.0 Service Pack 1

...and the failing server showed this:

NET Framework 2.0
NET Framework 3.0

...so it looked like it was just a matter of installing .NET 2.0 SP1. Unfortunately, it wasn't that simple, since its install threw a 1603 error as well. After trying some combinations of uninstalls and reinstalls, I ended up using this utility from Aaron Stebner to remove all the .NET Framework installations from the server: http://astebner.sts.winisp.net/Tools/dotnetfx_cleanup_tool.zip

Then I installed NET Framework 2.0 SP1 and NET Framework 3.0 SP1. With those in place, 3.5 finally installed without incident.

From the description of 2.0 SP1 on microsoft.com/downloads: In addition, this release provides security improvements, and prerequisite feature support for .NET Framework 3.0 Service Pack 1, and .NET Framework 3.5.

From the description of 3.0 SP1 on microsoft.com/downloads: In addition, this release provides security improvements, and prerequisite feature support for Microsoft .NET Framework 3.5.