|
Step
|
Topic
|
|
1. Open an existing OS design, or create a new one, and then build and download the run-time image to a target device.
| |
|
2. Use the Remote Registry Editor to discover the
HKEY_LOCAL_MACHINE/Init launch numbers for each .exe file that runs on the target device at startup.
To run your application at startup, assign launch numbers to your application's .exe files in the
HKEY_LOCAL_MACHINE/Init section of the registry of the target device.
If the connection fails, see Configuring the Connection to a Target Device Using Platform Manager.
These numbers use the launch
nn format, where
nn is the launch number.
|
Opening Remote Registry Editor
Connecting to a Target Device with a Remote Tool
|
|
3. Add the application to your OS design as a project.
| |
|
4. Create a registry entry in the
HKEY_LOCAL_MACHINE/Init section of the Project.reg file for your application.
| |
|
5. Build the changed Catalog items in your OS design.
| |
|
6. Configure a connection between your development workstation and your target device.
Note Debugging is not necessary at this point.
If your target device is a CEPC, boot your run-time image on the CEPC.
For more information, see How to Configure and Download a Run-Time Image to a CEPC.
If your target device is the Emulator, download your run-time image to the Emulator.
For more information, see Downloading a Run-Time Image to the Emulator.
|
Configuring a Connection for Downloading and Debugging
|
|
7. When the download process is complete, verify that the application launched properly on your target device.
The time required to display the OS depends on the size of the downloaded run-time image.
|
Not applicable
|
- Modify the registry file before building and downloading the run-time image.
- Use the Remote Registry Editor after downloading the run-time image to the device.
- From the Workspace window, choose the ParameterView tab at the bottom of the window.
- Expand the nodes until you find the folder for the target device you have chosen.
- Expand the folder and then expand the Project Specific Files folder.
- Select and open the appropriate registry file.
- Update or add the HKEY_LOCAL_MACHINE/Init section of the registry file with the following code.
6. [HKEY_LOCAL_MACHINE/Init]
7. "launchnn"="defined_module_name"
"dependnn"=hex:xx,yy...
Parameter
|
Description
|
launch
nn
|
Defines the order that the module is started in, where
nn is 00–99.
Enclose this parameter in double quotation marks (" ").
|
defined_module_name
|
Specifies the name of the module to be started.
Enclose this parameter in double quotation marks (" ").
|
depend
nn
|
Optional. Assigns a dependency that prevents the defined module from starting until another module is started, where
nn is 00–99.
Enclose this parameter in double quotation marks (" ").
|
hex:
xx,yy...
|
Defines the hexadecimal number of the module that must be run before the defined module is run.
This parameter consists of the
hex keyword, a colon, and one or more hexadecimal numbers, one for each byte of hexadecimal data.
|
- If you do not know the hexadecimal numbers for the module dependencies that your application requires, open and search Common.reg for the module names.
[HKEY_LOCAL_MACHINE/Init]
"launchnn"="defined_exe_name"
"dependnn"=hex:0A,00,14,00,1E,00,32,00
- Save and close the registry file.
You have successfully modified a registry file to run a module at startup.
以上方法是要通赤修改注册表来实现,对于用户来说,可能不方便,那么,我们能不能使Windows CE启动完成后自动运行Flash Disk上某个目录下的所的.exe文件呢,请看下面的:
在Windows CE 的Windows 目录下,有一个StartUp文件夹,在Windows CE启动完成后,Windows CE会自动运行这个文件夹下的所有.ExE文件,但这个目录下的所有内容在断电后会丢失,还是不能完成上电自动运行,那么我们能不能把这个目录改到Flash Disk上的某个目录下去呢,答案是肯定的,而且非常容易,我们只要修改注册表
[HKEY_LOCAL_MACHINE/SYSTEM/Explorer/Shell Folders]
"StartUp"="Flash Disk//StartUp"
这样,Windows CE开机后就会运行Flash Disk/StartUp目录下的所有.ExE文件.