Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EventLogInstaller::CopyFromComponent Method (IComponent^)

 

Copies the property values of an EventLog component that are required at installation time for an event log.

Namespace:   System.Diagnostics
Assembly:  System.Configuration.Install (in System.Configuration.Install.dll)

public:
virtual void CopyFromComponent(
	IComponent^ component
) override

Parameters

component
Type: System.ComponentModel::IComponent^

An IComponent to use as a template for the EventLogInstaller.

Exception Condition
ArgumentException

The specified component is not an EventLog.

-or-

The Log or Source property of the specified component is either null or empty.

The component specified by the component parameter must be an EventLog; otherwise, an exception is thrown.

Typically, you do not call the methods of the EventLogInstaller from within your code; they are generally called only by the Installutil.exe (Installer Tool). CopyFromComponent is used by Installutil.exe to set the property values for the EventLogInstaller to the values of an existing EventLog.

If the Log of the EventLog that is passed in is an empty string (""), you must set the Log property to a valid value before the installer executes.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft