You can find another example of SetRegistryData in my article Making an application run automatically when Windows starts.

 

Component Downloadhttp://www.latiumsoftware.com/download/delphi-2.zip