PDA program installation production (ZT)

zhaozj2021-02-16  81

What is the production of Windows CE / POCKET PC installation disk ??? BlackColor? Keyword ???? Windows CE?

???????????????????????? a Windows CE / Pocket PC mounting disk

?????????????????????????????????????? by blackcolor ??? 2002.02.21

??? Working environment: Microsoft EmbdvTools 3.0, Microsoft ActiveSync 3.1, Windows 98se, Microsoft Visual C 6.0, ??????????????? PDA is Lenovo Tianzhao 3000 (Windows CE 3.0 version, CPU is ARM SA1110)

??? The production of the Windows CE / Pocket PC installation disk can be divided into the following steps. Before the detailed instructions, it is assumed that in C: has established a directory Sample, there is an exe file Sample.exe (placed in Sample) The subdirectory Source under Source, and an ICO file Sample.ico.

First, prepare an INF file (Sample.inf), put it under C: / Sample, its format is as follows:

; PDA installation file: sample.inf;

[Version] Signature ?? = "$ Windows NT $" Provider ??? = "Your company name" CESIGNATURE = "$ Windows CE $"

[CESTRINGS] AppName ???? = "Your application name" installdir? =% CE1% /% AppName%

[CEDEVICE] processORTYPE ?????????? = 2577; CPU type is ARM SA11xx

[SOURCEDISKSNAMES] 1 =, "common files", Source; source file is under C: / Sample / SOURCE

[SOURCEDISKSFILES] SAMPLE.EXE ??????? = 1 ??????????; has compiled good EXE file

[Defaultinstall] CopyFiles ?? = files.installDiradDreg ????? = regdataceshortcuts = lines

[DESTINATIONDIRS] FILES.INSTALLDIR ??? =,% installdir% links ?????????????? =,% ce11% ?????????? DEFAULTDESTDIR ????? =,% Installdir%

[Files.installdir] "Porder.exe", PORDER.EXE ???????; copied file

[Regdata] HKLM, Software / Microsoft /% AppName%, Majorversion, 0x00010001, 1HKLM, Software / Microsoft /% AppName%, MinorVersion, 0x00010001, 0

[LINKS] "Shortcut Name", 0, Sample.exe,% CE17%? ???; create shortcuts in the start menu

Second, a CAB package with CabWiz.exe production, under CabWiz.exe file in the directory% evtoolsdir% / Windows CE Tools / wce300 / MS Pocket PC / support / ActiveSync / windows ce application installation / cabwiz, which is Microsoft EMBDVTOOLS% evtoolsdir% 3.0 installation directory, there is a file buildcab.bat in the superior directory of the directory, copy buildcab.bat to C: / Sample, modified to: @echo offmrem sample Batch File Used to Compile The Cabwiz Inf FileRemRemRem Replace

With the full path to the bagwiz.exe file

Rem Replace

With the full path to the sample.inf file

REM

REM Please add a pair of "Sample.inf" on the file "Sample.inf"

The command below REM should be a line

"% evtoolsdir% / windows ceb / support / activeSync / windows ce application installation / bagwiz / bagwiz.exe" "Sample.inf" / err.log

After the modification is completed, you can execute the buildcab.bat file, which will generate sample.cab.

Third, make an ini file install.ini, put it under C: / Sample, as follows:

[CEAPPMANAGER] Version = 1.0component = SAMPLE

[PORDER] Description = Description text iconfile = sample.icoiconindex = 0DeviceFile = sample.execabfiles = sample.cab

Fourth, connect the PDA to Windows 98se, enter the MS DOS mode, enter the installation directory of Microsoft ActiveSync 3.1 C: / Program Files / Microsoft ActiveSync, run as follows:

C: / Program Files / Microsoft ActiveSync> CEAPPMGR C: /sample/install.ini

The installer will start and install Sample.exe onto the PDA. If you feel that you have trouble every time, please refer to step five.

5. Creating a simple installation boot program using VC6 1. Open VC6 new project, select Win32 Application, "Project Name" in the Projects tab. 2. Second step Select "An Empty Project" and press the Finish button. 3. Create a new file install.cpp and join the project, as follows:

/ / -------------------------------------------------------------------------------------------- - // ?? PDA installer (PCKET PC) // ----------------------------------- ---------------

#include

#include

#include

#include

#include

#include

Int apientry Winmain (Hinstance Hinstance, ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? LPSTR ???? lpcmdline, ????????????????????? INT ?????? ncmdshow) {? // Take your own path? CHAR SZPATH [MAX_PATH] GetModuleFileName (NULL, SZPATH, MAX_PATH-1);? // Convert to INI file name? INT Ilen = Strlen (SZPATH);? STRCPY (& Szpath [Ilen-3], "Ini");? // Take CEAPPMGR ? full path of the .exe HKEY hResult;? char szCEAppMgr [] = "software // Microsoft // Windows // CurrentVersion // App paths // CEAppMgr.exe";? LONG iRet = RegOpenKeyEx (HKEY_LOCAL_MACHINE, szCEAppMgr, NULL, KEY_READ , & hResult) ;? BYTE szCEAppMgrExe [MAX_PATH * 2 1] ;? if (iRet == ERROR_SUCCESS)? {? DWORD cbName, dwType ;? cbName = MAX_PATH ;? dwType = REG_SZ ;? iRet = RegQueryValueEx (hResult, NULL, NULL, & DWTYPE, SZCEAPPMGREXE, & CBNAME);? RegcloseKey (HRESULT);?}? If (iret! = Error_success)? {? MessageBox (Null, "Please install Microsoft ActiveSync software!", "Error", MB_ICONERROR);? RETURN 1;?}? char szexe [max_path * 2 2] ;? Strcpy (szexe, (char *) szceAppmgrexe);

? // start the installation SHELLEXECUTEINFO ExecInfo;?? Memset ((char *) & ExecInfo, 0, sizeof (ExecInfo)) ;? ExecInfo.cbSize = sizeof (ExecInfo) ;? ExecInfo.fMask = SEE_MASK_CLASSKEY;? ExecInfo.hwnd = NULL; ? EXECINFO.LPFILE = SZEXE;? EXECINFO.LPPARETERS = SZPATH;? EXECINFO.NSHOW = SW_SHOW;

? SHELLEXECUTEEX (& ExecInfo);

? Return 0;}

4. Copy the compiled exe file install.exe, copy to the C: / Sample directory, run install.exe to automatically install the above software.

Sixth, explanation 1. More detailed information Please refer to Microsoft EmbdvTools 3.0 online help, Microsoft EmbdvTools 3.0 can be available free of charge by Microsoft. 2. Only one PDA in my hand, I didn't test the other models of PDA. 3. The copyright of this article belongs to the original author. Please indicate the source and maintain the integrity of this article, and the traditional media reprint must contact the original author, BUG and suggestions, please go to BlackColor@263.net. ?

转载请注明原文地址:https://www.9cbs.com/read-13897.html

New Post(0)