ComponentInstaller.CopyFromComponent メソッド
アセンブリ: System.Configuration.Install (system.configuration.install.dll 内)

Dim instance As ComponentInstaller Dim component As IComponent instance.CopyFromComponent(component)


イベント ログを作成し、イベント ログ コンポーネントのプロパティを EventLogInstaller にコピーする、クラス MyInstallClass を定義する例を次に示します。またこの例では、ServiceInstaller が EventLogInstaller と同じ種類のインストールを実行できるかどうかをチェックします。
Dim myEventLogInstaller As New EventLogInstaller() ' Create a source for the specified event log, on local computer. EventLog.CreateEventSource("MyEventSource", "MyEventLog", ".") ' Create an event log instance and associate it with the log . Dim myEventLog As New EventLog("MyEventLog", ".", "MyEventSource") ' Copy the properties that are required at install time from ' the event log component to the installer. myEventLogInstaller.CopyFromComponent(myEventLog)
EventLogInstaller myEventLogInstaller = new EventLogInstaller(); // Create a source for the specified event log, on local computer. EventLog.CreateEventSource("MyEventSource","MyEventLog", "."); // Create an event log instance and associate it with the log . EventLog myEventLog = new EventLog("MyEventLog", ".", "MyEventSource"); // Copy the properties that are required at install time from // the event log component to the installer. myEventLogInstaller.CopyFromComponent(myEventLog);
EventLogInstaller^ myEventLogInstaller = gcnew EventLogInstaller; // Create a source for the specified event log, on local computer. EventLog::CreateEventSource( "MyEventSource", "MyEventLog", "." ); // Create an event log instance and associate it with the log . EventLog^ myEventLog = gcnew EventLog( "MyEventLog",".","MyEventSource" ); // Copy the properties that are required at install time from // the event log component to the installer. myEventLogInstaller->CopyFromComponent( myEventLog );
EventLogInstaller myEventLogInstaller = new EventLogInstaller(); // Create a source for the specified event log, on local computer. EventLog.CreateEventSource("MyEventSource", "MyEventLog", "."); // Create an event log instance and associate it with the log . EventLog myEventLog = new EventLog("MyEventLog", ".", "MyEventSource"); // Copy the properties that are required at install time from // the event log component to the installer. myEventLogInstaller.CopyFromComponent(myEventLog);


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からComponentInstaller.CopyFromComponent メソッドを検索する場合は、下記のリンクをクリックしてください。

- ComponentInstaller.CopyFromComponent メソッドのページへのリンク