Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

DefaultManagementInstaller Class

Installs an instrumented assembly. To use this default project installer, simply derive a class from DefaultManagementInstaller inside the assembly. No methods need to be overridden.

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Configuration.Install.Installer
        System.Management.Instrumentation.DefaultManagementInstaller

Namespace:  System.Management.Instrumentation
Assembly:  System.Management.Instrumentation (in System.Management.Instrumentation.dll)
public class DefaultManagementInstaller : Installer

The DefaultManagementInstaller type exposes the following members.

  NameDescription
Public methodDefaultManagementInstallerInitializes a new instance of the DefaultManagementInstaller class. This is the default constructor.
Top
  NameDescription
Protected propertyCanRaiseEventsGets a value indicating whether the component can raise an event. (Inherited from Component.)
Public propertyContainerGets the IContainer that contains the Component. (Inherited from Component.)
Public propertyContextGets or sets information about the current installation. (Inherited from Installer.)
Protected propertyDesignModeGets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Protected propertyEventsGets the list of event handlers that are attached to this Component. (Inherited from Component.)
Public propertyHelpTextGets the help text for all the installers in the installer collection. (Inherited from Installer.)
Public propertyInstallersGets the collection of installers that this installer contains. (Inherited from Installer.)
Public propertyParentGets or sets the installer containing the collection that this installer belongs to. (Inherited from Installer.)
Public propertySiteGets or sets the ISite of the Component. (Inherited from Component.)
Top
  NameDescription
Public methodCommitWhen overridden in a derived class, completes the install transaction. (Inherited from Installer.)
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodDispose()Releases all resources used by the Component. (Inherited from Component.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the Component and optionally releases the managed resources. (Inherited from Component.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeReleases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodGetServiceReturns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public methodInstallWhen overridden in a derived class, performs the installation. (Inherited from Installer.)
Protected methodMemberwiseClone()Creates a shallow copy of the current Object. (Inherited from Object.)
Protected methodMemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Protected methodOnAfterInstallRaises the AfterInstall event. (Inherited from Installer.)
Protected methodOnAfterRollbackRaises the AfterRollback event. (Inherited from Installer.)
Protected methodOnAfterUninstallRaises the AfterUninstall event. (Inherited from Installer.)
Protected methodOnBeforeInstallRaises the BeforeInstall event. (Inherited from Installer.)
Protected methodOnBeforeRollbackRaises the BeforeRollback event. (Inherited from Installer.)
Protected methodOnBeforeUninstallRaises the BeforeUninstall event. (Inherited from Installer.)
Protected methodOnCommittedRaises the Committed event. (Inherited from Installer.)
Protected methodOnCommittingRaises the Committing event. (Inherited from Installer.)
Public methodRollbackWhen overridden in a derived class, restores the pre-installation state of the computer. (Inherited from Installer.)
Public methodToStringReturns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)
Public methodUninstallWhen overridden in a derived class, removes an installation. (Inherited from Installer.)
Top
  NameDescription
Public eventAfterInstallOccurs after the Install methods of all the installers in the Installers property have run. (Inherited from Installer.)
Public eventAfterRollbackOccurs after the installations of all the installers in the Installers property are rolled back. (Inherited from Installer.)
Public eventAfterUninstallOccurs after all the installers in the Installers property perform their uninstallation operations. (Inherited from Installer.)
Public eventBeforeInstallOccurs before the Install method of each installer in the installer collection has run. (Inherited from Installer.)
Public eventBeforeRollbackOccurs before the installers in the Installers property are rolled back. (Inherited from Installer.)
Public eventBeforeUninstallOccurs before the installers in the Installers property perform their uninstall operations. (Inherited from Installer.)
Public eventCommittedOccurs after all the installers in the Installers property have committed their installations. (Inherited from Installer.)
Public eventCommittingOccurs before the installers in the Installers property committ their installations. (Inherited from Installer.)
Public eventDisposedOccurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
Top

This class provides an interface for the standard installUtil installer in the .NET framework. Any assembly that contains Automation classes should include a class that is derived from this type. This will provide code that generates the schema of the automation objects, installs it into WMI, and creates the necessary provider registration code.

The following example shows how to derive a class from the DefaultManagementInstaller class to install a WMI provider.

[C#]

// This is the installer class that installs an instrumented assembly.
// To use the default project installer, simply derive a class from
// DefaultManagementInstaller.  No methods need to be overridden.
[System.ComponentModel.RunInstaller(true)]
public class TheInstaller : DefaultManagementInstaller
{ }

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.