导入本地化错误表和 ActionText 表

Error 表ActionText 表的本地化语言版本由 Windows Installer SDK 提供。 这些表的法语版本 Error.FRA 和 ActionTe.FRA 位于 Windows Installer SDK 的 Intl 文件夹中。

可以使用表编辑器 Orca 或 SDK 提供的实用程序 Msidb.exe 将这些表的法语版本导入到数据库中。

Windows Installer SDK 中提供了实用程序 WiImport.vbs,以此作为使用 MsiDatabaseImport 以及 Database 对象Import 方法 的示例。 下面的代码片段 Imp.vbs 也说明了 Import 方法的使用,并用于 Windows 脚本宿主。

'Imp.vbs. Argument(0) is the original database. Argument(1) is the
'    path of the folder containing the file to be imported. Argument(2) is the name of the file to be imported.
'
Option Explicit

' Check arguments
If WScript.Arguments.Count < 2 Then
    WScript.Echo "Usage is imp.vbs [original database] [folder path] [import file]"
    WScript.Quit(1)
End If

' Connect to Windows Installer object
On Error Resume Next
Dim installer : Set installer = Wscript.CreateObject("WindowsInstaller.Installer")
Dim databasePath : databasePath = Wscript.Arguments(0)
Dim folder : folder = Wscript.Arguments(1)
 
' Open database and process file
Dim database : Set database = installer.OpenDatabase(databasePath, 1)
Dim table : table = Wscript.Arguments(2)
database.Import folder, table 
 
' Commit database changes
database.Commit 'commit changes
Wscript.Quit 0

若要导入 Error.FRA 并取代 Error 表,可以使用如下所示的命令行。

Cscript Imp.vbs MNPFren.msi C:\Note_Installer\French Error.FRA

若要导入 ActionTe.FRA 并取代 ActionText,可以使用如下所示的命令行。

Cscript Imp.vbs MNPFren.msi C:\Note_Installer\French ActionTe.FRA

验证安装升级中所述,对 MNPFren.msi 重新运行验证。

继续