This script solves the "sql server angent service won't start" problem.
Usually if you are pretty sure that the service account running sqlserveragent has sufficient rights and this service still refuses to start up, it is most of the time becuase of either the misconfigured "Agent XPs" or inaccessible sql server agent errorlog file. The following script fixes both issues.
Note: change the followng path for errorlog to a correct path according to your local server's setting.
Author: Ning Xu
Applied version: 2005, 2008, 2008 R2
sp_configure 'show advanced options', 1;
sp_configure 'Agent XPs', 1;
RECONFIGURE with override
EXEC msdb.dbo.sp_set_sqlagent_properties @errorlog_file=N'D:\Programs\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\SQLAGENT.OUT'