User Selected Installation (Windows CE 5.0)

Send Feedback

Windows Mobile-based devices allow a user to choose the installation volume during a typical application installation. By default, an application can be placed in the main storage memory, called \Device, or in secondary storage on a storage card, called \Storage Card. The user can then choose the volume that has adequate free space.

Therefore, applications should be written with this freedom in mind; the application's installation directory can change at installation time based on the user's preference.

The user is prompted for the preferred installation volume only if the following two conditions are met:

  • The application developer has created an %installdir% variable in the [CEStrings] section of the .inf file.
  • The device has more than one storage volume available (such as a secondary MultiMedia card storage).

If you specify an %InstallDir% variable in the [CEStrings] section of the .inf file, an Installation Volume Selection prompt appears at installation time, enabling the user to select the volume for installation.

If you do not want the user to select the volume for installation, do not specify a default installation directory. For more information, see CEStrings.

To enable user selected installation volume prompting

  1. Specify the %Installdir% variable in the [CEStrings] section of the .inf file. This variable can contain other variables, such as %CE1% for the Program Files directory.
  2. Use the %Installdir% variable to specify the default destination in a [CopyFiles] key in the [DefaultInstall] section.
  3. (Optional) Use the %Installdir% variable in an individual FileCopy operation.
  4. The %Installdir% variable is also replaced in the value element in registry keys during an application installation. Specify these keys in an AddReg section of the .inf file.

To disable user-selected installation volume prompting

  • Do not specify an %installdir% variable in the [CEStrings] section of the .inf file. If this variable is not found, the device will not prompt the user.

After the .inf file has been processed by the CAB Wizard and the .cab file has been successfully sent to the device, application installation begins. If the two conditions mentioned previously are met, the user is prompted to select the installation location.

The user is prompted to select only the file volume, not a folder location. The prompting message lists all available storage locations on the system and each storage volume's available free space.

The fact that the user does not select a file location also means that only the storage volume information is replaced on the user selected installation location. For example, if the %installdir% variable is set to \MyApp in the .inf file and the user selects a MultiMedia card named MyStorageCard4, the installation location will be \MyStorageCard4\MyApp. This concept also applies to %CE% variables; if %installdir% is set to %CE1%\MyApp and the user selects the storage card as they did previously, the resulting location will be \MyStorageCard4\Program Files\MyApp.

See Also

Device-side Application Installation Options | Information File

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.