You have developed or bought a Windows CE system and developed an Application for it. Now you want to start your application every time the system boots up. Not an unusual need, but the solution will have a lot to do with who you are and what you have to work with.
So, who are you?
Platform Builder User
Since you are using Platform Builder, you have access to the system registry so you can use the HKEY_LOCAL_MACHINE\Init key to start your application. FileSys uses HKEY_LOCAL_MACHINE\Init to find which applications to start when the system boots. The values are LaunchXX and DependXX, where the XX are numbers; example Launche60 and Depend60. This is the same registry key that is used to start applications like the device manager, the services manager and the Explorer shell.
LaunchXX is a string value. Pick a number, one that makes sense within the context of your system, and set the value of LaunchXX to the name of your application; Example Launch60=”MyApp.exe”. You cannot use this string to pass command line arguments to your application. If you need to pass command line arguments, you should create a small wrapper application that calls on your application and passes arguments to it.
DependXX is a hex value. The XX number must match the number that you used for LaunchXX. The value indicates which of the LaunchXX applications your application is dependent on. "Depend60"=hex:14,00, 1e,00 indicates that the application is dependent on Launch20 (0x14 == 20) and Launch30 (0x1e == 30).
If you use HKEY_LOCAL_MACHINE\Init to start your application, you should call SignalStarted() to tell the system that your application is running and ready. Failure to call SignalStarted() can cause other applications to not be started.
Visual Studio User\End User
If you are not developing the Windows CE OS for your platform, you can add your application to the \Windows\Startup folder. This option does require that the \Windows\Startup folder is persistent and that the Explorer shell runs on your system.
You do have as an option the previous discussion for Platform Builder users, if the registry is persistent.
Using a Proprietary System
If you are using a COTS system, the OEM may have a proprietary way for you to start your application.