You can do this by running the following command from the "C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap" folder. Make sure the SQL Server 2005 original CD is available:
start /wait setup.exe /qb INSTANCENAME=MSSQLSERVER REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=test SQLCOLLATION=SQL_Latin1_General_CP1_CI_AI
More information can be found at http://msdn2.microsoft.com/en-us/library/ms179254(en-US,SQL.90).aspx.