|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
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.
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 SHGetSpecialFolderPathor 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.