To run your application on startup you have to add the registry parameters LaunchXX and DependXX (XX is 00-99) under the key [HKLM\Init].
LaunchXX defines the order that the module is started in. The value (string) specifies the name of the module to be started (e.g. "Launch80"="myprogram.exe")
DependXX assigns a dependency that prevents the module from starting until another module is started. The value (hex) defines the hexadecimal number of the module that must be run before the defiened module is run.
The entry for one module is two bytes long and you can specify more the one modules (e.g. "Depend80"=hex:14,00,1E,00 waits for modules defined in Launch20 and Launch30)
The applications to wait for has to call SignalStarted().
Please also refer MSDN online help "Configuring a Registry File to Run an Application at Startup".