AssemblyInstaller Class
Loads an assembly, and runs all the installers in it.
Assembly: System.Configuration.Install (in System.Configuration.Install.dll)
System::MarshalByRefObject
System.ComponentModel::Component
System.Configuration.Install::Installer
System.Configuration.Install::AssemblyInstaller
| 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 | |
![]() | Events | |
![]() | 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 | |
![]() | UseNewContext | Gets or sets a value indicating whether to create a new InstallContext object for the assembly's installation. |
| Name | Description | |
|---|---|---|
![]() ![]() | CheckIfInstallable(String^) | Checks to see if the specified assembly can be installed. |
![]() | Commit(IDictionary^) | Completes the installation transaction.(Overrides Installer::Commit(IDictionary^).) |
![]() | CreateObjRef(Type^) | 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() | |
![]() | Dispose(Boolean) | |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetLifetimeService() | Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.) |
![]() | GetService(Type^) | |
![]() | GetType() | |
![]() | InitializeLifetimeService() | Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.) |
![]() | Install(IDictionary^) | Performs the installation.(Overrides Installer::Install(IDictionary^).) |
![]() | MemberwiseClone() | |
![]() | MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.) |
![]() | OnAfterInstall(IDictionary^) | Raises the AfterInstall event.(Inherited from Installer.) |
![]() | OnAfterRollback(IDictionary^) | Raises the AfterRollback event.(Inherited from Installer.) |
![]() | OnAfterUninstall(IDictionary^) | Raises the AfterUninstall event.(Inherited from Installer.) |
![]() | OnBeforeInstall(IDictionary^) | Raises the BeforeInstall event.(Inherited from Installer.) |
![]() | OnBeforeRollback(IDictionary^) | Raises the BeforeRollback event.(Inherited from Installer.) |
![]() | OnBeforeUninstall(IDictionary^) | Raises the BeforeUninstall event.(Inherited from Installer.) |
![]() | OnCommitted(IDictionary^) | |
![]() | OnCommitting(IDictionary^) | Raises the Committing event.(Inherited from Installer.) |
![]() | Rollback(IDictionary^) | Restores the computer to the state it was in before the installation.(Overrides Installer::Rollback(IDictionary^).) |
![]() | ToString() | |
![]() | Uninstall(IDictionary^) | 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 | |
![]() | 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 |
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 ); } }
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.





