AssemblyInstaller.Commit メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > AssemblyInstaller.Commit メソッドの意味・解説 

AssemblyInstaller.Commit メソッド

インストール トランザクション完了します

名前空間: System.Configuration.Install
アセンブリ: System.Configuration.Install (system.configuration.install.dll 内)
構文構文

Public Overrides Sub Commit
 ( _
    savedState As IDictionary _
)
Dim instance As AssemblyInstaller
Dim savedState As IDictionary

instance.Commit(savedState)
public override void Commit (
    IDictionary savedState
)
public:
virtual void Commit (
    IDictionary^ savedState
) override
public void Commit (
    IDictionary savedState
)
public override function Commit (
    savedState : IDictionary
)

パラメータ

savedState

インストーラ コレクション内のすべてのインストーラ実行された後のコンピュータの状態を格納している IDictionary。

例外例外
解説解説
使用例使用例

AssemblyInstaller クラスの AssemblyInstaller コンストラクタInstall メソッド、および Commit メソッドの例を次に示します

AssemblyInstaller クラスは、AssemblyInstaller コンストラクタ呼び出すことで作成されます。MyAssembly_Install.exe アセンブリインストールするために、このオブジェクトプロパティ設定されInstall メソッドCommit メソッド呼び出されます。

Imports System
Imports System.Configuration.Install
Imports System.Collections
Imports System.Collections.Specialized

Class MyInstallClass
   
   Shared Sub Main()
      Dim mySavedState = New Hashtable()
      
      Console.WriteLine("")
      

      Try
         ' Set the commandline argument array for 'logfile'.
         Dim myString(0) As String
         myString(0) = "/logFile=example.log"
         ' Create an object of the 'AssemblyInstaller' class.
         Dim myAssemblyInstaller As New
 AssemblyInstaller()
         ' Set the properties to install the required assembly.
         myAssemblyInstaller.Path = "MyAssembly_Install.exe"
         myAssemblyInstaller.CommandLine = myString
         myAssemblyInstaller.UseNewContext = True
         
         ' Clear the 'IDictionary' object.
         mySavedState.Clear()
         
         ' Install the 'MyAssembly_Install' assembly.
         myAssemblyInstaller.Install(mySavedState)
         
         ' Commit the 'MyAssembly_Install' assembly.
         myAssemblyInstaller.Commit(mySavedState)
      Catch
      End Try

   End Sub 'Main
End Class 'MyInstallClass 
using System;
using System.Configuration.Install;
using System.Collections;
using System.Collections.Specialized;

class MyInstallClass
{
   static void Main()
   {
      IDictionary mySavedState = new Hashtable();

      Console.WriteLine( "" );

      try
      {
         // Set the commandline argument array for 'logfile'.
         string[] myString = new string[
 1 ];
         myString[ 0 ] = "/logFile=example.log";

         // Create an object of the 'AssemblyInstaller' class.
         AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller();

         // Set the properties to install the required assembly.
         myAssemblyInstaller.Path = "MyAssembly_Install.exe";
         myAssemblyInstaller.CommandLine = myString;
         myAssemblyInstaller.UseNewContext = true;

         // Clear the 'IDictionary' object.
         mySavedState.Clear();

         // Install the 'MyAssembly_Install' assembly.
         myAssemblyInstaller.Install( mySavedState );

         // Commit the 'MyAssembly_Install' assembly.
         myAssemblyInstaller.Commit( mySavedState );
      }
      catch( Exception )
      {
      }


   }
}
#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;
void main()
{
   IDictionary^ mySavedState = gcnew Hashtable;
   Console::WriteLine( "" );
   try
   {
      // Set the commandline argument array for 'logfile'.
      array<String^>^myString = {"/logFile=example.log"};
      
      // Create an Object* of the 'AssemblyInstaller' class.
      AssemblyInstaller^ myAssemblyInstaller = gcnew AssemblyInstaller;

      // Set the properties to install the required assembly.
      myAssemblyInstaller->Path = "MyAssembly_Install.exe";
      myAssemblyInstaller->CommandLine = myString;
      myAssemblyInstaller->UseNewContext = true;
      
      // Clear the 'IDictionary' Object*.
      mySavedState->Clear();
      
      // Install the 'MyAssembly_Install' assembly.
      myAssemblyInstaller->Install( mySavedState );
      
      // Commit the 'MyAssembly_Install' assembly.
      myAssemblyInstaller->Commit( mySavedState );
   }
   catch ( Exception^ e ) 
   {
      Console::WriteLine( e );
   }
}
import System.*;
import System.Configuration.Install.*;
import System.Collections.*;
import System.Collections.Specialized.*;

class MyInstallClass
{
    public static void main(String[]
 args)
    {
        IDictionary mySavedState = new Hashtable();

        Console.WriteLine("");
        try {
            // Set the commandline argument array for 'logfile'.
            String myString[] = new String[1];
            myString.set_Item(0, "/logFile=example.log");

            // Create an object of the 'AssemblyInstaller' class.
            AssemblyInstaller myAssemblyInstaller = new AssemblyInstaller();

            // Set the properties to install the required assembly.
            myAssemblyInstaller.set_Path("MyAssembly_Install.exe");
            myAssemblyInstaller.set_CommandLine(myString);
            myAssemblyInstaller.set_UseNewContext(true);

            // Clear the 'IDictionary' object.
            mySavedState.Clear();

            // Install the 'MyAssembly_Install' assembly.
            myAssemblyInstaller.Install(mySavedState);

            // Commit the 'MyAssembly_Install' assembly.
            myAssemblyInstaller.Commit(mySavedState);
        }
        catch (System.Exception exp) {
        }
    } //main
} //MyInstallClass
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
AssemblyInstaller クラス
AssemblyInstaller メンバ
System.Configuration.Install 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からAssemblyInstaller.Commit メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からAssemblyInstaller.Commit メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からAssemblyInstaller.Commit メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

AssemblyInstaller.Commit メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



AssemblyInstaller.Commit メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS