just a note: hkey_local_machine applies to all users accounts so if theres more then 1 and you want the program to run only for the currently logged in user , use hkey_current_user
another way , goto start-->programs and right click "startup" , click "open' , create a shortcut to the program , applies only to currently logged in user