I was searching on the sqlagent error messages and a link brought me to this entry.
While reviewing the entry I performed a regedit and discovered that the location in the registry of my sqlagent parameters does not match the post.
My system was created from an upgrade of a SQL Server 2000 Failover cluster and the parameters are found in the path of
hkey_local_machine/software/microsoft/microsoft sql server/
So before running the code verify your agent parameter location in the registry since based on the history of your upgrade path the registry may need to be updated differently.
-- Mark D Powell --