Issue:
Found that SQL Server 2005 setup fails to start SQL Service at the end of the installation with error Error 1058: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
When you look at setup log:
Could not start the MSSQLSERVER service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.
Root cause:
Desktop heap exhaustion
Troubleshooting step:
Run below command in command prompt replacing setup.exe with exact name of SQL 2005 setup exe name and look for Session# which should be 0:
tasklist /fi "Imagename eq setup.exe" /v /fo LIST
Also if you scroll through Event viewer and you will find Event ID 244: "Failed to create a desktop due to desktop heap exhaustion" recorded
More info about desktop heap exhaustion:
http://blogs.msdn.com/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx
949296 Some SQL Server replication agents cannot run when you configure many replication agents to run on a server
http://support.microsoft.com/default.aspx?scid=kb;EN-US;949296
945068 Some visual elements in SQL Server Management Studio lose functionality when you register many instances of SQL Server
http://support.microsoft.com/default.aspx?scid=kb;EN-US;945068
Solution:
Increase desktop heap as per above KB articles or stop unnecessary services running in the server