Este artículo se tradujo automáticamente. Para ver el artículo en inglés, active la casilla Inglés. Además, puede mostrar el texto en inglés en una ventana emergente si mueve el puntero del mouse sobre el texto.
Traducción
Inglés

Propiedad Installer.Context

 

Publicado: octubre de 2016

Obtiene o establece información sobre la instalación actual.

Espacio de nombres:   System.Configuration.Install
Ensamblado:  System.Configuration.Install (en System.Configuration.Install.dll)

<BrowsableAttribute(False)>
Public Property Context As InstallContext

Valor de propiedad

Type: System.Configuration.Install.InstallContext

InstallContext que contiene información sobre la instalación actual.

The P:System.Configuration.Install.Installer.Context property contains installation information. For example, information about the location of the log file for the installation, the location of the file to save information required by the M:System.Configuration.Install.Installer.Uninstall(System.Collections.IDictionary) method, and the command line that was entered when the installation executable was run.

The program that calls the M:System.Configuration.Install.Installer.Install(System.Collections.IDictionary), M:System.Configuration.Install.Installer.Commit(System.Collections.IDictionary), M:System.Configuration.Install.Installer.Rollback(System.Collections.IDictionary), or M:System.Configuration.Install.Installer.Uninstall(System.Collections.IDictionary) methods sets the P:System.Configuration.Install.Installer.Context property with information that the methods need.

If an installer belongs to an installer collection, the parent installer sets the P:System.Configuration.Install.Installer.Context property before calling any of these methods. The parent installer can be accessed through the P:System.Configuration.Install.Installer.Parent property.

The following example demonstrates the P:System.Configuration.Install.Installer.Context property of the T:System.Configuration.Install.Installer class. The contents of the P:System.Configuration.Install.Installer.Context property contain information about the location of the log file for the installation, the location of the file to save information required by the M:System.Configuration.Install.Installer.Uninstall(System.Collections.IDictionary) method, and the command line that was entered when the installation executable was run. These contents are then displayed on the console.

Dim myStringDictionary As StringDictionary = Context.Parameters
If Context.Parameters.Count > 0 Then
   Console.WriteLine("Context Property : ")
   Dim myString As String
   For Each myString In  Context.Parameters.Keys
      Console.WriteLine(Context.Parameters(myString))
   Next myString
End If

.NET Framework
Disponible desde 1.1
Volver al principio
Mostrar: