Share via


匯入當地語系化的錯誤和 ActionText 資料表

Windows Installer SDK 提供 Error 資料表ActionText 資料表 的當地語系化語言版本。 這些資料表的法文版本 Error.FRA 和 ActionTe.FRA 位於 Windows Installer SDK 的 Intl 資料夾中。

您可以使用資料表編輯器 Orca 或 SDK 提供的公用程式Msidb.exe,將這些資料表的法文版本匯入資料庫中。

在 Windows Installer SDK 中提供使用 MsiDatabaseImportDatabase 物件的Import 方法作為公用程式WiImport.vbs的範例。 下列程式碼片段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 資料表匯入並取代為 Error.FRA,您可以使用如下的命令列。

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

若要將 ActionText 資料表匯入並取代為 ActionTe.FRA,您可以使用命令列,如下所示。

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

驗證安裝升級中所述,重新執行MNPFren.msi驗證。

繼續