SQL 2008 R2 Install error

while installing SQL Server 2008 "A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.)"

I want to repeat this happened during install.
Thanks

at what stage?

Not sure what stage, towards the end.
SSIS and Analysis services installed correctly. It failed on the database server, but the service is there and running and I can’t start the agent service.

maybe something to do with the service accounts you selected? It's hard to say without more information about your choices. Or is this a command line install? If so, post your set command