A MUI Shortcut Example

This section describes how to add resource strings to the Windows Installer Shortcut table for use with Multilingual User Interfaces (MUI).

Windows Installer 2.0 and Windows Installer 3.0: Not supported. This example requires Windows Installer 4.0.

Refer to the Multilingual User Interface (MUI) documentation for information on how to develop MUI-enabled applications .

To add the resource strings used by Windows Vista Multilingual User Interfaces to a Windows Installer package:

  1. Add the information for all the language-neutral and language files to the File Table. For example, the files might consist of a language-neutral file (msimsg.dll) and language files for English (msimsgen.dll.mui), Japanese (msimsgja.dll.mui), and Chinese (msimsgcs.dll.mui). Each file can belong to a different component. Each file can have both a long and short file name. In the case of this example, the following information can be added to the File Table.

    File Table (partial)

    File Component_ FileName
    msimsgmuija MSIMSG_MUI_JA msimsgja.dll|msimsg.dll.mui
    msimsgmuics MSIMSG_MUI_CS msimsgcs.dll|msimsg.dll.mui
    msimsgmuien MSIMSG_MUI_EN msimsgen.dll|msimsg.dll.mui
    msimsgdll MSIMSG msimsg.dll

     

  2. Add information to the Component table for these components. Each component has a unique GUID identifier that should be entered into the ComponentId field of the Component table. The file belonging to the component can serve as the KeyPath for that component. The directory that contains each component can be specified in the Directory_ field. The following information can be added to the Component table.

    Component Table (partial)

    Component Directory_ KeyPath
    MSIMSG_MUI_JA MUIFolder_JA msimsgmuija
    MSIMSG_MUI_CS MUIFolder_CS msimsgmuics
    MSIMSG_MUI_EN MUIFolder_EN msimsgmuien
    MSIMSG MUIFolder msimsgdll

     

  3. Edit the Directory table so that the components are installed into the correct directories. Be sure to include information about the directory where the shortcut will be installed. For example, the following information might be added to the Directory table of a package that installs the components and a shortcut located in the DesktopFolder directory.

    Directory Table (partial)

    Directory Directory_Parent DefaultDir
    TARGETDIR SourceDir
    MsiTest TARGETDIR MsiTest:.
    MUIFolder MsiTest MUI
    MUIFolder_CS MUIFolder cs-CZ
    MUIFolder_EN MUIFolder en-US
    MUIFolder_JA MUIFolder ja-JP
    DesktopFolder TARGETDIR .

     

  4. Add a row to the Shortcut table for each shortcut. For example, the Shortcut table could contain the following information for two shortcuts, Quick1 and Quick2, installed into the DirectoryFolder directory. Each shortcut belongs to the feature specified in the Target field. The icon associated with the shortcut can be specified in the Icon_ field and the Icon table.

    Shortcut Table (partial)

    Shortcut Directory_ Component_ Target Icon
    Quick1 DesktopFolder MSIMSG FeatureChild1_Local HelpFileIcon.exe
    Quick2 DesktopFolder MSIMSG FeatureChild1_Local HelpFileIcon.exe

     

  5. Add information to the Feature Table table for the feature owns shortcut belongs. When the shortcut is activated, the installer verifies that all the components belonging to this feature are installed before launching the key file of the component specified in the Component_ column of the Shortcut table. In the case of this example, the following information can be added to the Feature Table table for the FeatureParent1_Local feature.

    Feature Table (partial)

    Feature Feature_Parent Title Attributes
    FeatureParent1_Local FeatureParent1_Local 16
    FeatureChild1_Local FeatureParent1_Local FeatureParent1_Local 0

     

  6. For each new shortcut, add the resource string information to the DisplayResourceDLL, DisplayResourceId, DescriptionResourceDLL, and DescriptionResourceId fields of the Shortcut table. The DisplayResourceDLL and DescriptionResourceDLL fields contain the resource string in the Formatted string format. The formatted string can use the [#filekey] convention of the Formatted format. Add the display and description indices for the resource strings in the DisplayResourceId and DescriptionResourceId fields.

    Shortcut Table (partial)

    Shortcut DisplayResourceDLL DisplayResourceId DescriptionResourceDLL DescriptionResourceId
    Quick1 [#msimsgdll] 36 [#msimsgdll] 37
    Quick2 [#msimsgdll] 38 [#msimsgdll] 39

     

  7. After installing the package, test to ensure that the Multilingual User Interface is working as expected.