In fact, there are several methods to enable a program to start in wince, which is similar to that in windows. One app creates one recipe, pointing to our app, such as app.exe, and then placing the shortcut under/Windows/startup.
The steps are as follows: (fake app.exe has been copied to Windows)
1. Create a file in Pb, select TXT as the file type, and name it as the. lnk suffix. Assume the file name is test. lnk.
2. Edit the content as follows: 16 #/Windows/app.exe. Note: The first 16 is # The sum of all characters, including spaces. This definition can be used in the help document of wince, but after I try it, the system prompts that the file cannot be found when I finally go down to the target machine. In wince, view the created test. the lnk attribute points to two boxes after/Windows/app.exe. Therefore, it is incorrect. My solution is to modify test. the content of Lnk is 16 # "/Windows/app.exe"
3. Edit the lnk file and modify project. bib in Pb. Add the following line after the files Section: (similar to adding other files to the image, see my "how to add files to the image in wince", add the build statement under setting in the flatform menu of Pb)
Test. lnk $ (_ flatreleasedir)/test. lnk NK s
Add the following line to project. DAT:
Directory ("/Windows/startup"):-file ("test. lnk", "/Windows/test. lnk ")
In this way, our program will be automatically started after the system starts.
You can also edit the Registry by adding the following content to project. Reg:
[HKEY_LOCAL_MACHINE/init]
"Launch80" = "app.exe"
"Depend80" = HEX: 14,00, 1e, 00
Period. Note that the number range after launch is 0 to 99, which will not be effective.
The effects of these two methods are that the system first starts the resource manager assumer.exe (that is, the default desktop), then starts our program (if taskman shell is used and then the taskbar is removed, the effect is better), but this is not enough. How can we not display the desktop, what about our programs?
Someone introduced the method on the Internet to remove standard shell, but I always reported an error during compilation. My website is replaced by the "assumer.exe" in lauch50in the registration table for my app.exe.
How to modify the Registry: first run the system with kitl, and modify it in tools> Remote Registry Editor of Pb. After verification, modify platfrom. reg, or write your own reg file, and then in platform. reg include sysgen and then confirm reginit In the rel directory of the relevant project in pbworkspace. the INI file contains your own modifications, and then make the image and download it.
It is worth adding that the setting platform we introduced in the previous step adds the statement because I re-run sysgen and build every time, if it is just a simple make image (all commands under the build OS menu in Pb), the content in release will be used directly, so you can also directly put the file in the release folder, then change the project. bib and Other implementations to add files to the image. Similarly, you can directly modify the shell in release. the launch50 value in Reg is our own program (or something similar to modifying reginit. INI file, reginit. INI files are stored in all static registries of Wince to remove the desktop and directly start our program ).
Note: If you click Close to start the program, it will crash because there is no window to run. In practice, we certainly won't ask the user to close our program unless they close the system together.
If you also need to build a file, you can add the modified shell. reg to the release directory by adding the file to the image.