To do it programmically, You should change Kernel32.dll.
If You wish easy start Your program at start-up: it is not for all systems the same. On Windows 95/98/ME You can use autoexec.bat, if You has a command-line Program (easy write in the file:
C:\YourProgram.exe
and You have it).
On Windows NT/2000/XP You should use the Registry. For Win32 Programs You must use the Registry for all Systems. You can write in Registry programmically too.
If You wish to replace couple system Files with Your Program at startup, You have to do some another things in the Registry. If Your Program is a service or a driver, You should also write another things in the Registry.