SnapInInstaller Class

 

Utilizes reflection to search for the snap-ins that are defined within the currently loaded assembly. The resulting metadata is then used to populate or remove register entries that correspond to each snap-in. For each assemblies in which snap-ins are defined, a class that is derived from the SnapInInstaller class must exist with the RunInstallerAttribute set to true. Unless additional assembly registration needs to be performed, this derived class declaration does not need to override any of the SnapInInstaller virtual methods. The derived class provides an entry point for tools such as InstallUtil.exe to execute the framework installer code. The SnapInInstaller class is the base class for snap-in registration.

Namespace:   Microsoft.ManagementConsole
Assembly:  Microsoft.ManagementConsole (in Microsoft.ManagementConsole.dll)

Inheritance Hierarchy

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Configuration.Install.Installer
        Microsoft.ManagementConsole.SnapInInstaller

Syntax

public class SnapInInstaller : Installer
public ref class SnapInInstaller : Installer
type SnapInInstaller = 
    class
        inherit Installer
    end
Public Class SnapInInstaller
    Inherits Installer

Constructors

Name Description
System_CAPS_pubmethod SnapInInstaller()

Initializes a new instance of the SnapInInstaller class.

Properties

Name Description
System_CAPS_protproperty CanRaiseEvents

(Inherited from Component.)

System_CAPS_pubproperty Container

(Inherited from Component.)

System_CAPS_pubproperty Context

(Inherited from Installer.)

System_CAPS_protproperty DesignMode

(Inherited from Component.)

System_CAPS_protproperty Events

(Inherited from Component.)

System_CAPS_pubproperty HelpText

(Inherited from Installer.)

System_CAPS_pubproperty Installers

(Inherited from Installer.)

System_CAPS_pubproperty Parent

(Inherited from Installer.)

System_CAPS_pubproperty Site

(Inherited from Component.)

Methods

Name Description
System_CAPS_pubmethod Commit(IDictionary)

(Inherited from Installer.)

System_CAPS_pubmethod CreateObjRef(Type)

(Inherited from MarshalByRefObject.)

System_CAPS_pubmethod Dispose()

(Inherited from Component.)

System_CAPS_protmethod Dispose(Boolean)

(Inherited from Component.)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Component.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetLifetimeService()

(Inherited from MarshalByRefObject.)

System_CAPS_protmethod GetService(Type)

(Inherited from Component.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod InitializeLifetimeService()

(Inherited from MarshalByRefObject.)

System_CAPS_pubmethod Install(IDictionary)

Writes settings into the registry. This method overrides the virtual Install method for Installer class. For each snap-in that is defined in the loaded assembly, reflection is used to get registration information such as their node types, their snap-in identities, and other information. These settings are then written to the registry. If a rollback is required, previous settings are stored in the supplied IDictionary value. (Overrides Installer.Install(IDictionary).)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone(Boolean)

(Inherited from MarshalByRefObject.)

System_CAPS_protmethod OnAfterInstall(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethod OnAfterRollback(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethod OnAfterUninstall(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethod OnBeforeInstall(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethod OnBeforeRollback(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethod OnBeforeUninstall(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethod OnCommitted(IDictionary)

(Inherited from Installer.)

System_CAPS_protmethod OnCommitting(IDictionary)

(Inherited from Installer.)

System_CAPS_pubmethod Rollback(IDictionary)

This method uses any saved registry settings in the supplied dictionary and attempts to reapply them. This method overrides the virtual Rollback method for the Installer class. (Overrides Installer.Rollback(IDictionary).)

System_CAPS_pubmethod ToString()

(Inherited from Component.)

System_CAPS_pubmethod Uninstall(IDictionary)

Removes settings from the registry. This method overrides the virtual Uninstall method for the Installer class. For each snap-in that is defined in the loaded assembly, reflection is used to get registration information such as their node types, their identities, and other information. These settings are then removed from the registry as part of the uninstall. (Overrides Installer.Uninstall(IDictionary).)

Events

Name Description
System_CAPS_pubevent AfterInstall

(Inherited from Installer.)

System_CAPS_pubevent AfterRollback

(Inherited from Installer.)

System_CAPS_pubevent AfterUninstall

(Inherited from Installer.)

System_CAPS_pubevent BeforeInstall

(Inherited from Installer.)

System_CAPS_pubevent BeforeRollback

(Inherited from Installer.)

System_CAPS_pubevent BeforeUninstall

(Inherited from Installer.)

System_CAPS_pubevent Committed

(Inherited from Installer.)

System_CAPS_pubevent Committing

(Inherited from Installer.)

System_CAPS_pubevent Disposed

(Inherited from Component.)

Remarks

The current implementation of the SnapInInstaller class assumes and enforces the fact that an assembly contains at most one snap-in per assembly. Furthermore, it is assumed that all of the nodes for that snap-in that can be registered are also defined within the assembly. Any nodes that are defined within an assembly are assumed to be associated with the snap-in that is defined within that assembly.

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Installer
SnapIn
Microsoft.ManagementConsole Namespace

Return to top