Condividi tramite


Importazione di tabelle di errori e ActionText localizzate

Le versioni localizzate della tabella degli errori e tabella ActionText vengono 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 Importdel Databasedell'oggettoviene fornito nel Windows Installer SDK come script 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

Rieseguire la verifica in MNPFren.msi come descritto in Verifica di un aggiornamento dell'installazione.

Continua