RunInstallerAttribute クラス
アセンブリ: System (system.dll 内)

<AttributeUsageAttribute(AttributeTargets.Class)> _ Public Class RunInstallerAttribute Inherits Attribute
[AttributeUsageAttribute(AttributeTargets::Class)] public ref class RunInstallerAttribute : public Attribute

Installer から継承するクラスが、RunInstallerAttribute に true を 設定してマークされている場合は、アセンブリのインストール時に、Visual Studio の Custom Action Installer または InstallUtil.exe が起動されます。RunInstallerAttribute に false を設定してマークされたメンバは、インストーラを起動しません。既定値は false です。
![]() |
---|
true の RunInstallerAttribute を使用してプロパティをマークすると、この属性の値は定数メンバ Yes に設定されます。RunInstallerAttribute に false を設定してマークされたプロパティの場合、値は No になります。したがって、コード内でこの属性の値を確認する場合は、属性を RunInstallerAttribute.Yes または RunInstallerAttribute.No として指定する必要があります。 |

MyProjectInstaller に対してインストーラを実行する必要があることを指定する例を次に示します。
<RunInstallerAttribute(True)> _ Public Class MyProjectInstaller Inherits Installer ' Insert code here. End Class 'MyProjectInstaller
[RunInstallerAttribute(true)] ref class MyProjectInstaller: public Installer{ // Insert code here. };
/** @attribute RunInstallerAttribute(true) */ public static class MyProjectInstaller extends Installer { // Insert code here. } //MyProjectInstaller
MyProjectInstaller のインスタンスを作成する例を次に示します。そのクラスの属性を取得し、RunInstallerAttribute を抽出してから、インストーラを実行するかどうかを出力します。
Public Shared Function Main() As Integer ' Creates a new installer. Dim myNewProjectInstaller As New MyProjectInstaller() ' Gets the attributes for the collection. Dim attributes As AttributeCollection = TypeDescriptor.GetAttributes(myNewProjectInstaller) ' Prints whether to run the installer by retrieving the ' RunInstallerAttribute from the AttributeCollection. Dim myAttribute As RunInstallerAttribute = _ CType(attributes(GetType(RunInstallerAttribute)), RunInstallerAttribute) Console.WriteLine(("Run the installer? " & myAttribute.RunInstaller.ToString())) Return 0 End Function 'Main
public static int Main() { // Creates a new installer. MyProjectInstaller myNewProjectInstaller = new MyProjectInstaller(); // Gets the attributes for the collection. AttributeCollection attributes = TypeDescriptor.GetAttributes(myNewProjectInstaller); /* Prints whether to run the installer by retrieving the * RunInstallerAttribute from the AttributeCollection. */ RunInstallerAttribute myAttribute = (RunInstallerAttribute)attributes[typeof(RunInstallerAttribute)]; Console.WriteLine("Run the installer? " + myAttribute.RunInstaller.ToString()); return 0; }
int main() { // Creates a new installer. MyProjectInstaller^ myNewProjectInstaller = gcnew MyProjectInstaller; // Gets the attributes for the collection. AttributeCollection^ attributes = TypeDescriptor::GetAttributes( myNewProjectInstaller ); /* Prints whether to run the installer by retrieving the * RunInstallerAttribute from the AttributeCollection. */ RunInstallerAttribute^ myAttribute = dynamic_cast<RunInstallerAttribute^>(attributes[ RunInstallerAttribute::typeid ]); Console::WriteLine( "Run the installer? {0}", myAttribute->RunInstaller ); return 0; }
public static void main(String[] args) { // Creates a new installer. MyProjectInstaller myNewProjectInstaller = new MyProjectInstaller(); // Gets the attributes for the collection. AttributeCollection attributes = TypeDescriptor.GetAttributes(myNewProjectInstaller); /* Prints whether to run the installer by retrieving the RunInstallerAttribute from the AttributeCollection. */ RunInstallerAttribute myAttribute = ((RunInstallerAttribute)(attributes.get_Item( RunInstallerAttribute.class.ToType()))); Console.WriteLine(("Run the installer? " + System.Convert.ToString(myAttribute.get_RunInstaller()))); } //main

System.Attribute
System.ComponentModel.RunInstallerAttribute


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


RunInstallerAttribute コンストラクタ
アセンブリ: System (system.dll 内)


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


RunInstallerAttribute フィールド

名前 | 説明 | |
---|---|---|
![]() | Default | 既定の可視性である No を指定します。static フィールドは読み取り専用です。 |
![]() | No | アセンブリのインストール時に、Visual Studio の Custom Action Installer または インストーラ ツール (Installutil.exe) が起動されないことを指定します。static フィールドは読み取り専用です。 |
![]() | Yes | アセンブリのインストール時に、Visual Studio の Custom Action Installer または インストーラ ツール (Installutil.exe) が起動されることを指定します。static フィールドは読み取り専用です。 |

RunInstallerAttribute プロパティ

名前 | 説明 | |
---|---|---|
![]() | RunInstaller | アセンブリのインストール中にインストーラを起動するかどうかを示す値を取得します。 |
![]() | TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。 ( Attribute から継承されます。) |

RunInstallerAttribute メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 オーバーライドされます。 指定した RunInstallerAttributeの値が、現在の RunInstallerAttribute と等しいかどうかを判断します。 |
![]() | GetCustomAttribute | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 ( Attribute から継承されます。) |
![]() | GetCustomAttributes | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 ( Attribute から継承されます。) |
![]() | GetHashCode | オーバーライドされます。 現在の RunInstallerAttribute のハッシュ コードを生成します。 |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | IsDefaultAttribute | オーバーライドされます。 この属性が既定値かどうかを判断します。 |
![]() | IsDefined | オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 ( Attribute から継承されます。) |
![]() | Match | 派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 ( Attribute から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

RunInstallerAttribute メンバ
アセンブリのインストール時に、Visual Studio の Custom Action Installer または インストーラ ツール (Installutil.exe) が起動されるかどうかを指定します。
RunInstallerAttribute データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | Default | 既定の可視性である No を指定します。static フィールドは読み取り専用です。 |
![]() | No | アセンブリのインストール時に、Visual Studio の Custom Action Installer または インストーラ ツール (Installutil.exe) が起動されないことを指定します。static フィールドは読み取り専用です。 |
![]() | Yes | アセンブリのインストール時に、Visual Studio の Custom Action Installer または インストーラ ツール (Installutil.exe) が起動されることを指定します。static フィールドは読み取り専用です。 |

名前 | 説明 | |
---|---|---|
![]() | RunInstaller | アセンブリのインストール中にインストーラを起動するかどうかを示す値を取得します。 |
![]() | TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。(Attribute から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 オーバーライドされます。 指定した RunInstallerAttributeの値が、現在の RunInstallerAttribute と等しいかどうかを判断します。 |
![]() | GetCustomAttribute | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 (Attribute から継承されます。) |
![]() | GetCustomAttributes | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 (Attribute から継承されます。) |
![]() | GetHashCode | オーバーライドされます。 現在の RunInstallerAttribute のハッシュ コードを生成します。 |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | IsDefaultAttribute | オーバーライドされます。 この属性が既定値かどうかを判断します。 |
![]() | IsDefined | オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 (Attribute から継承されます。) |
![]() | Match | 派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 (Attribute から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

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

- RunInstallerAttributeのページへのリンク