QA: How can I create setup.exe file that will automatically install necessart .cab file on Pocket PC?
By Vassili Philippov, November 14, 2001.
Print version
Question
I have created .cab file using CabWizard. Now I want to create a setup.exe file that will
automatically install necessary .cab file on Pocket PC. How can I do it?
Answer
First of all you should create .ini file that describes which .cab files correspond
to which platform. This is a text file, here is an example:
[CEAppManager]
Version = 1.0
Component = MyProgram
[Palbum]
Description = MyProgram application
Uninstall = MyProgram
;Because there are multiple .cab files specific to a CPU type,
;these files are relative to the installation directory.
CabFiles = myprogram.arm.cab,myprogram.mips.cab,myprogram.sh3.cab
Then you should run ActiveSync (ceappmgr.exe) with this file as a parameter. You will
find path to the ActiveSync executable file in registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\CEAPPMGR.EXE.
Background
There are three items in Pocket PC Logo requirements about installation from desktop computer.
Here they are:
Required: Use Microsoft Windows Powered Pocket PC Application Installation mechanism.
Applications bearing the Ready for Windows logo must be installed to the Microsoft Windows
Powered Pocket PC platform using the Pocket PC Application installation mechanism.
This comprises the use of 2 components: the Cabwiz SDK setup tool (to create Pocket PC-specific
CAB files) and the CEAppMgr desktop application manager program (to register the application
for Microsoft Windows for Pocket PC application management). We are no longer supporting
the single utility on the desktop computer, PPCLoad, but a standard installation method.
Using the Application Installation mechanism allows multiple installation scenarios:
desktop-to-device, Internet-to-device, and CF Card-to-device.
Required: For the desktop-to-device install scenario, applications need to register the
multiple processor-specific CAB files with CEAppMgr.
Applications need to register the multiple processor-specific CAB files (typically one
CAB file per processor type) with CEAppMgr (by executing CEAppMgr with a CEAppMgr-specific
INI file), which will determine which CAB file to install for the connected device.
To work for all MIPS processors, ship with the R3910 binaries. The full path and filename
of CEAppMgr is stored in the desktop registry:
HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\CEAPPMGR.EXE
Recommended: For the desktop-to-device install scenario, the default install directory
should be a subdirectory under the "Microsoft ActiveSync" directory
Applications using the desktop-to-device install scenario should copy all the files to
the desktop PC. The default installation location on the desktop PC should be a
subdirectory under the "Microsoft ActiveSync" directory. The following registry entry
gives you the full path of the "Microsoft ActiveSync" directory:
HKLM\Software\Microsoft\Windows CE Services\InstalledDir
Sample
You can use ready setup.exe (37 Kb) file for your installation. It does
the following:
- If you pass file name as a command line argument (like myprogram.ini) then it installs program
that is described in this file.
- If you do not pass a command line argument then it installs program that is described
in install.ini file in the same folder.
You can also recompile setup.exe to use your .ini file by default.
Download sources (23 Kb) and substitute
install.ini string with your file name.
So your full installation (usually creted with InstallShield or Wise Installer or something like that)
should do the following:
- Copy all .cab files, your .ini file and setup.exe into some folder (as you can read above
it is recommended to copy them into a sibfolder of Microsoft ActiveSync folder
- Start setup.exe file and it will install your program to Pocket PC
Related resources:
Discuss
Discuss this article.
Here you can write your comments and read comments of other developers.
|