I. Tool Software To install the program on WinCE, you need to create the *. Cab installation package. Special tools and software are required to create the *. Cab installation package. The most commonly used tool is wince cab manager. Ii. Preparation and Installation Process Step 1: Create a. inf file first To create the. Cab installation package, you only need to write a. inf file, you can also use the text editing tool to create it, and prepare all the files and programs you want to install to PPC. Step 2: generate a cab package As long as you open your inf file in wince cab manager, WinCE cab manager will generate the *. cab file based on your inf file. You just need to save it. Step 4: connect your phone to the PC through USB and run the *. Arm. cab file. 3. Prepare an INF file description The first field [version] You can modify the provider in Java. Do not touch the other two parameters. The second field [cestings] CompanyName = "bbs.ucweb.com" Appname = "PPC" Installdir = \ userdata \ myoa Note: CompanyName is the company name and can be modified at will. Appname is the application name and can be modified at will. Installdir is the path of the wince terminal installed by the application, which can be modified at will. Third Field [cedevice] The cedevice field is the device platform corresponding to the program, so you don't have to worry about it. The fourth field [sourcedisksnames] Is the disk path where the source file program is located. 1 =, "cab", "d: \ oasourcedir \ programe \" You can modify "D: \ oasourcedir \ programe \" to specify the path of the source file, that is, the *. EXE file path of the installation disk to be created. Do not modify any other files. The fifth field [sourcedisksfiles] Is the list of source files to be packaged. The value = 1 next to it indicates the file path, that is, 1 in [sourcedisksnames. Oa.exe = 1 Readme.txt = 1 My.jpg = 1 You can add the name of any source file to be packaged in the format of file name. file type = 1 The sixth field [defainstall install] Ceshortcuts = ceshortcuts1, ceshortcuts2, ceshortcuts3, ceshortcuts4 Copyfiles = files. Common Addreg = regdata When the app is installed on the mobile phone: The copyfiles parameter indicates how to decompress and copy files during installation, and the addreg parameter indicates how to modify the Registry during installation. The ceshortcuts parameter indicates how to create a shortcut on the wince desktop. Copyfiles = followed by the field name, that is, what exactly do you want to copy. Addreg = works the same way. For example, in the tutorial, copyfiles‑files.common=*cabwiz.exe needs to copy a file, You need to copy some files to the specified directory for installation. The files to be copied are in the [files. Common] field. Addreg = regdata indicates that the installation program also needs to modify the registry. The modified content is in the [regdata] field. The seventh field [files. Common] That is, to install and copy files to your mobile phone, which files need to be copied during the target installation should be the same as the file name in [sourcedisksfiles. Oa.exe,.exe .exe, 0 Readme.txt,readme.txt, 0 My.jpg, my.jpg, 0 The eighth field [shortcuts] About Application desktop shortcut settings: Sample app,0 sample.exe Sample app,0, sample.exe, % installdir % Field syntax description: the four fields are separated by commas. The content of the first three fields must be filled in. The first field is the shortcut key name, that is, the name of the desktop shortcut in wince. 0 indicates a file in the second domain, and any other non-zero number indicates a directory, The third field is the target program (directory) of the shortcut key ), The fourth field is the optional field, which is the directory for storing the shortcut key. The default directory is shortcuts = "" in [destinationdirs]. You can specify other directories, if you want to add your own shortcut keys to the Start Menu, write storage \ windows \ startmenu \ here \. The following is an example: Mobile OA, OA .exe, userdata \ myoa The ninth field [regdata] The Registry is modified when the installation program is sent to the mobile phone step. The first "," indicates the names of the four major blocks in the Registry, which can be abbreviated directly. For example, HKLM in the template represents HKEY_LOCAL_MACHINE, and the other three are hkcr, hkcu, and HKU respectively. The second "," indicates the specific path of the key you want to modify (if not, it will be automatically created), that is, the complete item (key) Name, The third "," indicates the key you want to modify (that is, we often modify the Registry Article Value Name). If there is no value, the program will be automatically created, The fourth "," indicates the value type. Currently, I only know that the integer is 0x00010001 (See Supplement 2). leave it blank for the dense data. ",. Finally, it is the value you want to fill in. In the example HKLM, Software \ Microsoft \ shell \ Rai \: callalert, bkbitmapfile, "\ storage \ Application Data \ home \ iMac \ call1.jpg" Indicates the value of the key bkbitmapfile. It is stored in HKLM \ Software \ Microsoft \ shell \ Rai \: callalert, the value is \ storage \ Application Data \ home \ iMac \ call1.jpg. Obviously, this is a string-type key. 4. How to obtain an INF file example Install an wince cab manager. It is best to install a Chinese language. Open a current cab file, select File-export to inf from the menu, and select the export path, you can generate an INF file of the current cab file in the directory you specified! You can study it yourself! 4. Make your own cab package by courier Writing an INF package is still quite time-consuming for me. My general method is to find a current cab package and open it with Wince cab manager, on the wince cab Manager page, you can directly Delete, add files, or modify the registry key, and save the file to get your own cab package. I believe that everyone here should make their own cab package! |