Enable the program to run automatically when the Windows CE system is started

Source: Internet
Author: User
Let the program Windows CE Automatically run when the system starts (method 1)1. assume Windows CE. net target project directory is E:/smdk2440, and the project has been built successfully. Assume that the application program of Windows ce.netis myapp.exe and stored on the local hard drive E; 2. modify the project of the mywince project. in the bib file, add the following content in modules: myapp.exe E:/myapp.exe nk h 3. create a shortcut file MyApp. the content of the lnk file is as follows: 10 #/Windows/myapp.exe MyApp. the lnk file is also placed in the E:/directory; 4. modify the project of the mywince project. bib file, add the following content in files: MyApp. lnk E:/MyApp. lnk nk h 5. modify the project of the mywince project. add the following content to the DAT file: Directory ("/Windows/startup"):-file ("MyApp. lnk ","/win Dows/MyApp. lnk ") 8. platform builder ide: [Build]-> [make image] (do not build or rebuild) 9. after successful completion, the obtained nk.bin(or nk.nb0133 includes the application myapp.exe and MyApp. lnk, when the corresponding kernel is burned into the Development Board MyApp program, it will automatically run at system startup.   System Program startup sequence (self-start method 2)The premise of using this method is that the application to be started has been compiled into NK. nb0 or NK. Bin. The specific method and description are as follows: Platform. Reg or common. Reg. Add the following content in the [HKEY_LOCAL_MACHINE/init] section:
"Launchxx" = "<your program>" "dependxx" = HEX: yy, ZZ ,... XX is a decimal number, indicating the startup sequence identifier of <your program>. YY and ZZ are hexadecimal digits of least significant, indicates the startup sequence identifier of the Program <your program> depends on (prior to <your program> RUN. Let's look at two system examples: [HKEY_LOCAL_MACHINE/init]; @ cesysgen if ce_modules_shell "launch10" = "shell.exe"; @ cesysgen endifif imgtiny !; @ Cesysgen if ce_modules_device "launch20" = "device.exe"; @ cesysgen endif; @ cesysgen if ce_modules_gwesif nogui! "Launch30" = "gwes.exe" "depend30" = HEX: enabled "can be started. If you want to start your program at system startup, you can set it as follows: for example, "launch80" = "myapp.exe" "depend80" = HEX: 1E, 00 indicates that the startup sequence of program myapp.exe is 80, and it depends on the program identified as 30 (that is, 001e. If <your program> does not depend on other programs, you do not need to add "dependxx" = HEX: yy, ZZ ,... directive; If <your program> depends on multiple programs, specify in the "dependxx" Directive; eg. "launch80" = "myapp.exe" "depend80" = HEX: 0a, 00, 1e, 00 indicates the programs marked as 10 and 30 for the startup dependencies of the myapp.exe program. Note that the values after launch cannot be the same as the default values of a program. Otherwise, an error will be reported during compilation. After modification, you only need platformbuilder ide-> build-> makeimage to generate a new NK. bin. You do not need to re-compile it. Remove system startup Explorer ItemWindows CE. Net desktop is really beautiful, but if we use Microsoft Desktop in embedded systems, it will always make me feel like nothing. Therefore, we need to find a way to start our program and replace the Microsoft Desktop. The startup shortcut and the method of hiding the taskbar are very effective. However, every time we start, Microsoft Desktop always comes out first and then starts our program. One method is as follows: 1) first create a project and put your application in the kernel (This section describes how to do it); 2) Compile the platform; 3) Modify E: /smdk2440/reldir/samsung_smdk2440_armv4irelease/shell. reg file: there is such a line in the file: [HKEY_LOCAL_MACHINE/init] "launch50" = "assumer.exe" "depend50" = HEX:, change this assumer.exe to your application (for example: myapp.exe). 4) platform builder ide: [Build]-> [make image] (remember not to build or rebuild). Otherwise, you will be able to discard your efforts. 5) after success, the obtained nk.bin(or nk.nb0133 includes the application myapp.exe and MyApp. lnk. When the corresponding kernel is burned into the Development Board MyApp, it will automatically run at system startup. So far, you can make your programs run automatically when the Windows CE system is started. Principles: 1. You can package custom files into NK. bin by editing the project. bib file. The files section describes the file name, the path of the source file, and the attributes of the file in the target system. Above, myapp.exe $ (_ flatreleasedir)/myapp.exe nk h indicates to package the myapp.exe file in the directory of myapp.exe, for example, E:/smdk2440/reldir/samsung_smdk2440_armv4irelease. bin, and the file will be in the kernel memory area. The file property type is hidden. The second method is to add user feature. Platformbuilder ide-> featureview-> on "mywince features", right click the mouse-> insert user feature-> point to the file you want to package. No matter which packaging method is used, all files in the/Windows Directory are in the started Windows CE system. The next step is to reorganize the directory structure of the file system as needed. 2. To organize the directory structure of the file system, modify the description of the file directory structure added to the project. dat file. The syntax is as follows: Root:-directory ("<Directory Name>") indicates creating directory ("/<Directory Name>") under the root directory "): -directory ("<subdirectory Name>") indicates creating the subdirectory directory under the specified directory ("/(" <Directory Name>/<subdirectory Name> "): -File ("<File Name>. <extension> ","/Windows/<File Name>. <extension> ") indicates creating files in the specified directory or copying files in the Windows directory. The display name is <File Name>. <extension>. 3. applications do not have to be packaged into NK. bin assumes that the program is in a certain position on the hard disk, such as/Hard Disk/MyApp/myapp.exe, you only need to create a shortcut file and link to/Hard Disk/MyApp/myapp.exe. The entire process is simply to find out which directory the application will appear, create a correct shortcut file, and modify the directory organization configuration of the target system, finally, package the application and the corresponding shortcut file into NK. bin.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.