MSILOC.EXE -- Copyright (c) Microsoft Corporation 2000. All rights reserved. - compile unicode for Windows NT 4.0 and Windows 2000 - compile ansi for Windows 9X - compiled from msiloc.cpp sample code FEATURES: 1.) Generates a resource file (.rc) from a Windows Installer database (.msi) 2.) Imports a resource dll (.dll) into a Windows Installer database (.msi) ================================================================================================================== msiloc /? will display the command line options availabe. A summary of the options is provided below. EXPORT .msi to .rc msiloc.exe -e {database} {option 1} [{option 2}...] IMPORT .dll (.res) into .msi msiloc.exe -i {database} {resource dll} {option 1} [{option 2}...] OPTIONS -d * // all dialogs, available in both export and import modes -d {dialog} // specific dialog, available in both export and import modes -s * * // all strings, available in import mode -s {table} {column} // specific table column, available in export mode -x // no binary data, available in export mode -c {database} // save to new database, available in export and import modes The -d {dialog} option can be specified up to 32 times on the command line. The -s {table} {column} option can be specified up to 32 times on the command line. The -d * option cannot be used with the -d {dialog} option. The tool does not automattically create a compiled resource file (.res). Use the following command to create it. RC.EXE is availabe with Microsoft Visual Studio and is the resource compiler. rc.exe {resource file} For import, the tool requires that the localized compiled resource file (.res) be linked into a dynamic link library (.dll). Use the following command to create it. LINK.EXE is available with Microsoft Visual Studio and is the linker. link.exe /DLL /NOENTRY /NODEFAULTLIB /MACHINE:iX86 /OUT:{resource dll} {compiled .res file} ================================================================================================================== Important Information: 1.) Exporting a MSI to RC only works with a database that is marked langauge neutral. To check the codepage of your database, use the msiinfo tool with the following command line. The msiinfo tool is provided in the Windows Installer 1.1 SDK. msiinfo {database} /d Alternatively, you can use the MsiDatabaseExport API to export the _ForceCodepage table. 2.) You can only import a localized resource file via the DLL into a database whose codepage is LANGUAGE_NEUTRAL or whose codepage matches the codepage of the localized resource file. 3.) When importing on Windows 9x, the User/System Locale must be set to the codepage of the localized resource file. 4.) When importing on WindowsNT/Windows2000, the codepage of the localized resource file must be installed on the system. 5.) The tool creates three tables -- _RESDialogs, _RESControls, and _RESStrings for maintaining resource Id's and for permitting correct update of the data. Therefore the database is always opened read/write. In addition the database you import into must contain these tables. Generally this should be the same database you exported from, or a copy of that database after the export. 6.) The RichEdit control is exported as Static Text. 7.) Tab order and attributes are not utilized by the tool. Billboards are not exported, but a groupbox placeholder is put on the dialog where the Billboard would appear on the dialog. 8.) When exporting binary data, the temporary files are placed in the folder returned by W32::GetTempFolder(). These files can be deleted after the resource file (.rc) is compiled (.res). 9.) Because radiobutton properties can be used, import only updates the width, height, and text. The x and y dimensions of radiobuttons are local to the group to which they belong and those values could change among the various radiobutton groups. Furthermore, if a property is used more than once, the last property imported wins out. Each time the radiobutton is found as control, the RadioButton table is updated with the new data. If a particular radiobutton is not localized, it could overwrite the localized data of a radiobutton with the same property that was found earlier. 10.) A resource file has a limitation to the maximum length of a string. The tool outputs the string "!! STR OVER LIMIT!!" for this occurence and upon import will ignore the update of the string. 11.) The tool does not support localization of the _SummaryInformation stream of the Windows Installer database. In addition, it does not permit import of new dialogs, new controls, and/or new strings. ================================================================================================================== KNOWN ISSUES 1.) Specifying the same column of a table more than once when exporting strings will cause the generation of an invalid resource file (due to duplicate ID's since the tool attempts to maintain the same resource IDs). 2.) Specifying the same dialog more than once when exporting specific dialogs will cause the generation of an invalid resource file (due to duplicate ID's since the tool attempts to maintain the same resource IDs).