Partager via


Compatible Application Installations

4/19/2010

If you create an installer or .cab file for distributing an application, use the following guidelines to help make sure that the application installs successfully on all devices.

Dynamically Discover the Path of the Application Manager Executable

If you create an installer that runs on a desktop computer and installs an application on a cradled Windows Mobile device, the installer must start the Application Manager. Because the location of this executable may change, look the path up in the registry under the following key.

HKLM\Software\Microsoft\Windows\CurrentVersion\AppPaths\CEAPPMGR.EXE

For an example of creating an installer that starts Application Manager, see Creating an Installer for Windows Mobile Applications.

Dynamically Obtain System Paths on the Device

When the application installs, it may have to install additional files on the device. Do not hard code paths to folders on the device. The correct way to discover system paths depends on the method that you use for packaging and installing the application.

If you create a custom setup .dll that runs on the device during installation, you should dynamically discover all paths using SHGetSpecialFolderPath or System.Environment.GetFolderPath as described in Registry and File System Compatibility. For more information about how to create setup .dlls, see Optional Setup.dll Files for Installation.

If you use Cab Wizard to create your .cab file, use macros in your .inf file to obtain directory information dynamically. For information about how to use macros for file paths in .inf files, see Windows Embedded CE Strings.

Install all .dll files in the application's directory.

See Also

Concepts

CAB Wizard

Other Resources

Packaging Windows Mobile Applications With CAB Wizard