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)

    FileComponent_FileName
    msimsgmuijaMSIMSG_MUI_JAmsimsgja.dll|msimsg.dll.mui
    msimsgmuicsMSIMSG_MUI_CSmsimsgcs.dll|msimsg.dll.mui
    msimsgmuienMSIMSG_MUI_ENmsimsgen.dll|msimsg.dll.mui
    msimsgdllMSIMSGmsimsg.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)

    ComponentDirectory_KeyPath
    MSIMSG_MUI_JAMUIFolder_JAmsimsgmuija
    MSIMSG_MUI_CSMUIFolder_CSmsimsgmuics
    MSIMSG_MUI_ENMUIFolder_ENmsimsgmuien
    MSIMSGMUIFoldermsimsgdll

     

  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)

    DirectoryDirectory_ParentDefaultDir
    TARGETDIRSourceDir
    MsiTestTARGETDIRMsiTest:.
    MUIFolderMsiTestMUI
    MUIFolder_CSMUIFoldercs-CZ
    MUIFolder_ENMUIFolderen-US
    MUIFolder_JAMUIFolderja-JP
    DesktopFolderTARGETDIR.

     

  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)

    ShortcutDirectory_Component_TargetIcon
    Quick1DesktopFolder MSIMSGFeatureChild1_LocalHelpFileIcon.exe
    Quick2DesktopFolderMSIMSGFeatureChild1_LocalHelpFileIcon.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)

    FeatureFeature_ParentTitleAttributes
    FeatureParent1_LocalFeatureParent1_Local16
    FeatureChild1_LocalFeatureParent1_LocalFeatureParent1_Local0

     

  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)

    ShortcutDisplayResourceDLLDisplayResourceIdDescriptionResourceDLLDescriptionResourceId
    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.

 

 

Show: