This documentation is archived and is not being maintained.
AssemblyInstaller Class
Visual Studio 2010
Loads an assembly, and runs all the installers in it.
System::Object
System::MarshalByRefObject
System.ComponentModel::Component
System.Configuration.Install::Installer
System.Configuration.Install::AssemblyInstaller
System::MarshalByRefObject
System.ComponentModel::Component
System.Configuration.Install::Installer
System.Configuration.Install::AssemblyInstaller
Assembly: System.Configuration.Install (in System.Configuration.Install.dll)
The AssemblyInstaller type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | AssemblyInstaller() | Initializes a new instance of the AssemblyInstaller class. |
![]() | AssemblyInstaller(Assembly, array<String>) | Initializes a new instance of the AssemblyInstaller class, and specifies both the assembly to install and the command line to use when creating a new InstallContext object. |
![]() | AssemblyInstaller(String, array<String>) | Initializes a new instance of the AssemblyInstaller class, and specifies both the file name of the assembly to install and the command line to use when creating a new InstallContext object for the assembly's installation. |
| Name | Description | |
|---|---|---|
![]() | Assembly | Gets or sets the assembly to install. |
![]() | CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Inherited from Component.) |
![]() | CommandLine | Gets or sets the command line to use when creating a new InstallContext object for the assembly's installation. |
![]() | Container | Gets the IContainer that contains the Component. (Inherited from Component.) |
![]() | Context | Gets or sets information about the current installation. (Inherited from Installer.) |
![]() | DesignMode | Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.) |
![]() | Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component.) |
![]() | HelpText | Gets the help text for all the installers in the installer collection. (Overrides Installer::HelpText.) |
![]() | Installers | Gets the collection of installers that this installer contains. (Inherited from Installer.) |
![]() | Parent | Gets or sets the installer containing the collection that this installer belongs to. (Inherited from Installer.) |
![]() | Path | Gets or sets the path of the assembly to install. |
![]() | Site | Gets or sets the ISite of the Component. (Inherited from Component.) |
![]() | UseNewContext | Gets or sets a value indicating whether to create a new InstallContext object for the assembly's installation. |
| Name | Description | |
|---|---|---|
![]() ![]() | CheckIfInstallable | Checks to see if the specified assembly can be installed. |
![]() | Commit | Completes the installation transaction. (Overrides Installer::Commit(IDictionary).) |
![]() | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
![]() | Dispose() | Releases all resources used by the Component. (Inherited from Component.) |
![]() | Dispose(Boolean) | Releases the unmanaged resources used by the Component and optionally releases the managed resources. (Inherited from Component.) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | Install | Performs the installation. (Overrides Installer::Install(IDictionary).) |
![]() | MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) |
![]() | OnAfterInstall | Raises the AfterInstall event. (Inherited from Installer.) |
![]() | OnAfterRollback | Raises the AfterRollback event. (Inherited from Installer.) |
![]() | OnAfterUninstall | Raises the AfterUninstall event. (Inherited from Installer.) |
![]() | OnBeforeInstall | Raises the BeforeInstall event. (Inherited from Installer.) |
![]() | OnBeforeRollback | Raises the BeforeRollback event. (Inherited from Installer.) |
![]() | OnBeforeUninstall | Raises the BeforeUninstall event. (Inherited from Installer.) |
![]() | OnCommitted | Raises the Committed event. (Inherited from Installer.) |
![]() | OnCommitting | Raises the Committing event. (Inherited from Installer.) |
![]() | Rollback | Restores the computer to the state it was in before the installation. (Overrides Installer::Rollback(IDictionary).) |
![]() | ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.) |
![]() | Uninstall | Removes an installation. (Overrides Installer::Uninstall(IDictionary).) |
| Name | Description | |
|---|---|---|
![]() | AfterInstall | Occurs after the Install methods of all the installers in the Installers property have run. (Inherited from Installer.) |
![]() | AfterRollback | Occurs after the installations of all the installers in the Installers property are rolled back. (Inherited from Installer.) |
![]() | AfterUninstall | Occurs after all the installers in the Installers property perform their uninstallation operations. (Inherited from Installer.) |
![]() | BeforeInstall | Occurs before the Install method of each installer in the installer collection has run. (Inherited from Installer.) |
![]() | BeforeRollback | Occurs before the installers in the Installers property are rolled back. (Inherited from Installer.) |
![]() | BeforeUninstall | Occurs before the installers in the Installers property perform their uninstall operations. (Inherited from Installer.) |
![]() | Committed | Occurs after all the installers in the Installers property have committed their installations. (Inherited from Installer.) |
![]() | Committing | Occurs before the installers in the Installers property committ their installations. (Inherited from Installer.) |
![]() | Disposed | Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.) |
In the following example, an AssemblyInstaller is created by invoking the AssemblyInstaller constructor. The properties of this object are set and the Install and Commit methods are called to install the MyAssembly.exe assembly.
#using <System.dll> #using <System.Configuration.Install.dll> using namespace System; using namespace System::Configuration::Install; using namespace System::Collections; using namespace System::Collections::Specialized; int main() { IDictionary^ mySavedState = gcnew Hashtable; Console::WriteLine( "" ); try { // Set the commandline argument array for 'logfile'. array<String^>^commandLineOptions = {"/LogFile=example.log"}; // Create an object of the 'AssemblyInstaller' class. AssemblyInstaller^ myAssemblyInstaller = gcnew AssemblyInstaller( "MyAssembly.exe", commandLineOptions ); myAssemblyInstaller->UseNewContext = true; // Install the 'MyAssembly' assembly. myAssemblyInstaller->Install( mySavedState ); // Commit the 'MyAssembly' assembly. myAssemblyInstaller->Commit( mySavedState ); } catch ( ArgumentException^ ) { } catch ( Exception^ e ) { Console::WriteLine( e->Message ); } }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:
