Condividi tramite


Importazione di tabelle ActionText e errori localizzati

Le versioni localizzate della tabella Error e della tabella ActionText sono fornite da Windows Installer SDK. Le versioni in lingua francese di queste tabelle, Error.FRA e ActionTe.FRA, si trovano nella cartella Intl di Windows Installer SDK.

È possibile usare l'editor di tabelle Orca o l'utilità Msidb.exe fornita con l'SDK per importare le versioni francesi di queste tabelle nel database.

Un esempio di utilizzo di MsiDatabaseImport e del metodo Importdell'oggetto Database viene fornito in Windows Installer SDK come utilità WiImport.vbs. Il frammento di codice seguente, Imp.vbs, illustra anche l'uso del metodo Import ed è per l'uso con Windows Script Host.

'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

Per importare e sostituire la tabella Error con Error.FRA, è possibile usare una riga di comando come la seguente.

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

Per importare e sostituire la tabella ActionText con ActionTe.FRA, è possibile usare una riga di comando come la seguente.

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

Eseguire di nuovo la convalida in MNPFren.msi come descritto in Convalida di un aggiornamento di installazione.

Continua