This is one of old issues that I came across while installing TFS 2005, but hope this might still help someone who are trying their hands with TFS the first time.

While running TFS installation (AT if its a Dual Tier) you might get a error: 
Error: 

“Microsoft Visual Studio 2005 Team Foundation Server - ENU -- The installer has
encountered an unexpected error installing this package. This may indicate a
problem with this package. The error code is 26105.”

MSI SNIPPET:

MSI (s) (A0:28) [14:39:33:581]: Executing op:
CustomActionSchedule(Action=WriteMetabaseChanges,ActionType=25601,Source=BinaryData,
Target=**********,CustomActionData=**********)
MSI (s) (A0:50) [14:39:33:597]: Invoking remote custom action. DLL:
C:\WINDOWS\Installer\MSIFE6.tmp, Entrypoint: WriteMetabaseChanges
WriteMetabaseChanges: failed to open root key, retrying 0 time(s)...
WriteMetabaseChanges: Error 0x80070422: failed to create web application:
/LM/W3SVC/3/Root
MSI (s) (A0!54) [14:39:44:738]: Product: Microsoft Visual Studio 2005 Team
Foundation Server - ENU -- The installer has encountered an unexpected error
installing this package. This may indicate a problem with this package. The error
code is 26105. The arguments are: -2147023838, /LM/W3SVC/3/Root,

WriteMetabaseChanges: Error 0x80070422: failed to create ASP App
MSI (s) (A0:28) [14:39:44:879]: User policy value 'DisableRollback' is 0
MSI (s) (A0:28) [14:39:44:879]: Machine policy value 'DisableRollback' is 0
Action ended 14:39:44: InstallFinalize. Return value
3.

Solution:

In our case we turned on “COM+ System Application” Services and this took care of
the issue.

1) Open Services.msc from Start> Run
2) Locate “Com+System Application” Service
3) If the service is disabled, enable it and set it to manual.

Note: If this didnot fix the issue, please check the forum for other possible
solution:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=20753&SiteID=1

 Also, this issue does not invoke a Rollback of the MSI installation; this
might leave back the TFS app pools and STS databases in the machine. Make sure you
remove them and uninstall and reinstall SharePoint services before you start a new
installation.

Content by: Arunrama

Reviewed by: Lucky