false.</returns>
      <param name="value">Chaîne contenant la valeur à convertir. </param>
      <param name="result">Lorsque cette méthode est retournée, si la conversion a réussi, contient true si <paramref name="value" /> est égal à <see cref="F:System.Boolean.TrueString" /> ou false si <paramref name="value" /> est égal à <see cref="F:System.Boolean.FalseString" />.Si la conversion a échoué, contient false.La conversion échoue si <paramref name="value" /> est null ou n'est pas égal à la valeur du champ <see cref="F:System.Boolean.TrueString" /> ou <see cref="F:System.Boolean.FalseString" />.</param>
      <filterpriority>1</filterpriority>
    </member>
    <member name="T:System.Buffer">
      <summary>Manipule les tableaux de types primitifs.</summary>
      <filterpriority>2</filterpriority>
    </member>
    <member name="M:System.Buffer.BlockCopy(System.Array,System.Int32,System.Array,System.Int32,System.Int32)">
      <summary>Copie un nombre spécifié d'octets à partir d'un tableau source en commençant à un offset particulier vers un tableau de destination commençant à un offset donné.</summary>
      <param name="src">Mémoire tampon source. </param>
      <param name="srcOffset">Offset d'octet de base zéro dans <paramref name="src" />. </param>
      <param name="dst">Mémoire tampon de destination. </param>
      <param name="dstOffset">Offset d'octet de base zéro dans <paramref name="dst" />. </param>
      <param name="count">Nombre d'octets à copier. </param>
      <exception cref="T:System.ArgumentNullException">
        <paramref name="src" /> ou <paramref name="dst" /> est null. </exception>
      <exception cref="T:System.ArgumentException">
        <paramref name="src" /> ou <paramref name="dst" /> n'est pas un tableau de primitives.ou Le nombre d'octets pour <paramref name="src" /> est inférieur à <paramref name="srcOffset" /> plus <paramref name="count" />.ou Le nombre d'octets pour <paramref name="dst" /> est inférieur à <paramref name="dstOffset" /> plus <paramref name="count" />. </exception>
      <exception cref="T:System.ArgumentOutOfRangeException">
        <paramref name="srcOffset" />, <paramref name="dstOffset" /> ou <paramref name="count" /> est inférieur à 0. </exception>
      <filterpriority>1</filterpriority>
    </member>
    <member name="M:System.Buffer.ByteLength(System.Array)">
      <summary>Retourne le nombre d'octets dans le tableau spécifié.</summary>
      <returns>Nombre d'octets dans le tableau.</returns>
      <param name="array">Tableau. </param>
      <exception cref="T:System.ArgumentNullException">
        <paramref name="array" /> a la valeur null. </exception>
      <exception cref="T:System.ArgumentException">
        <paramref name="array" /> n'est pas une primitive. </exception>
      <exception cref="T:System.OverflowException">
        <paramref name="array" /> est supérieur à 2 gigaoctets (Go).</exception>
      <filterpriority>1</filterpriority>
    </member>
    <member name="M:Syst' Windows Installer database table import for use with Windows Scripting Host
' Copyright (c) Microsoft Corporation. All rights reserved.
' Demonstrates the use of the Database.Import method and MsiDatabaseImport API
'
Option Explicit

Const msiOpenDatabaseModeReadOnly     = 0
Const msiOpenDatabaseModeTransact     = 1
Const msiOpenDatabaseModeCreate       = 3
Const ForAppending = 8
Const ForReading = 1
Const ForWriting = 2
Const TristateTrue = -1

Dim argCount:argCount = Wscript.Arguments.Count
Dim iArg:iArg = 0
If (argCount < 3) Then
	Wscript.Echo "Windows Installer database table import utility" &_
		vbNewLine & " 1st argument is the path to MSI database (installer package)" &_
		vbNewLine & " 2nd argument is the path to folder containing the imported files" &_
		vbNewLine & " Subseqent arguments are names of archive files to import" &_
		vbNewLine & " Wildcards, such as *.idt, can be used to import multiple files" &_
		vbNewLine & " Specify /c or -c anywhere before file list to create new database" &_
		vbNewLine &_
		vbNewLine & "Copyright (C) Microsoft Corporation.  All rights reserved."
	Wscript.Quit 1
End If

' Connect to Windows Installer object
On Error Resume Next
Dim installer : Set installer = Nothing
Set installer = Wscript.CreateObject("WindowsInstaller.Installer") : CheckError

Dim openMode:openMode = msiOpenDatabaseModeTransact
Dim databasePath:databasePath = NextArgument
Dim folder:folder = NextArgument

Dim WshShell, fileSys
Set WshShell = Wscript.CreateObject("Wscript.Shell") : CheckError
Set fileSys = CreateObject("Scripting.FileSystemObject") : CheckError

' Open database and process list of files
Dim database, table
Set database = installer.OpenDatabase(databasePath, openMode) : CheckError
While iArg < argCount
	table = NextArgument
	' Check file name for wildcard specification
	If (InStr(1,table,"*",vbTextCompare) <> 0) Or (InStr(1,table,"?",vbTextCompare) <> 0) Then
		' Obtain list of files matching wildcard specification
		Dim file, tempFilePath
		tempFilePath = WshShell.ExpandEnvironmentStrings("%TEMP%") & "\dir.tmp"
		WshShell.Run "cmd.exe /U /c dir /b " & folder & "\" & table & ">" & tempFilePath, 0, True : CheckError
		Set file = fileSys.OpenTextFile(tempFilePath, ForReading, False, TristateTrue) : CheckError
		' Import each file in directory list
		Do While file.AtEndOfStream <> True
			table = file.ReadLine
			database.Import folder, table : CheckError
		Loop
		file.Close
		fileSys.DeleteFile(tempFilePath)
	Else
		database.Import folder, table : CheckError
	End If
Wend
database.Commit 'commit changes if no import errors
Wscript.Quit 0

Function NextArgument
	Dim arg, chFlag
	Do
		arg = Wscript.Arguments(iArg)
		iArg = iArg + 1
		chFlag = AscW(arg)
		If (chFlag = AscW("/")) Or (chFlag = AscW("-")) Then
			chFlag = UCase(Right(arg, Len(arg)-1))
			If chFlag = "C" Then 
				openMode = msiOpenDatabaseModeCreate
			Else
				Wscript.Echo "Invalid option flag:", arg : Wscript.Quit 1
			End If
		Else
			Exit Do
		End If
	Loop
	NextArgument = arg
End Function

Sub CheckError
	Dim message, errRec
	If Err = 0 Then Exit Sub
	message = Err.Source & " " & Hex(Err) & ": " & Err.Description
	If Not installer Is Nothing Then
		Set errRec = installer.LastErrorRecord
		If Not errRec Is Nothing Then message = message & vbNewLine & errRec.FormatText
	End If
	Wscript.Echo message
	Wscript.Quit 2
End Sub
