RegOpenKey and related functions you can use to write them.

For Startups there is a Run key where you can have all your startups programs can be placed.
raghav like this