You can find another example of SetRegistryData in my article Making an application run automatically when Windows starts.
Component Download: http://www.latiumsoftware.com/download/delphi-2.zip