desktop6:CustomInstall

デスクトップ アプリケーションで、デスクトップ アプリケーションと共にインストールされる 1 つ以上の追加のインストーラー ファイル (.exe または .msi) を指定できるようにします。 たとえば、これはサード パーティの再頒布可能コンポーネントをバンドルするアプリに役立ちます。

手記

この要素は現在、Microsoft およびパートナーによって公開されている特定の種類のデスクトップ PC ゲームでのみ使用することを目的としています。 これには、制限された機能customInstallActions が必要です。

要素階層

<パッケージの>

     <拡張機能の>

          <desktop6:Extension>

               <desktop6:CustomInstall>

構文

<desktop6:CustomInstall
  Folder = 'A string with a value between 1 and 256 characters in length that cannot contain these characters: <, >, :, ", |, ?, or *.' 
  desktop8:RunAsUser = 'An optional boolean value.'>

  <!-- Child elements -->
  desktop6:InstallActions
  desktop6:RepairActions
  desktop6:UninstallActions?

</desktop6:CustomInstall>

? 省略可能 (ゼロまたは 1)

属性と要素

属性

属性 形容 データ型 必須 既定値
フォルダーの すべてのカスタム アクションに必要なすべてのファイルを含むパッケージ フォルダーの名前。 このフォルダーにはサブフォルダーが含まれている場合があります。 <>:"|?、または *の文字を含むことができない長さが 1 ~ 256 文字の文字列。 はい

子要素

子要素 形容
InstallActions デスクトップ アプリケーションの最初の起動前に実行されるインストーラー ファイルを指定します。
RepairActions ユーザーがデスクトップ アプリケーションの [設定] ページで修復またはリセット オプションを選択したときに実行されるインストーラー ファイルを指定します。
UninstallActions ユーザーがデスクトップ アプリケーションをアンインストールするときに実行されるインストーラー ファイルを指定します。

親要素

Parent 要素 形容
desktop6:Extension デスクトップ アプリケーションの機能拡張ポイントを宣言します。
desktop8:RunAsUser タスクを現在のユーザーとして実行するかどうかを示します。

備考

この要素には、制限された機能customInstallActions が必要です。

OS は、desktop6:InstallActiondesktop6:RepairAction、および desktop6:UninstallAction 要素の Name 属性を使用して、関連するインストール、修復、およびアンインストール操作のセットを識別します。 相互に組み合わせて実行する必要がある関連する一連のアクションを指定するには、Name 属性の値が同じであることを確認します。 OS は、対応するインストールまたは修復アクションが実行されている場合にのみ、アンインストール アクションを実行します。

<Package
  xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6"
  xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
  IgnorableNamespaces="rescap desktop6">

  <!-- ... -->
  <!-- Other entries omitted for brevity. -->
  <!-- ... -->

  <Extensions>
    <desktop6:Extension Category="windows.customInstall">
      <desktop6:CustomInstall Folder="MyInstallers">
        <desktop6:InstallActions>
          <desktop6:InstallAction File="Setup_AntiCheat.exe" Name="AC_1" Arguments="/add /silent" />
        </desktop6:InstallActions>
        <desktop6:RepairActions>
          <desktop6:RepairAction File="Setup_AntiCheat.exe" Name="AC_1" Arguments="/add /silent /force" />
        </desktop6:RepairActions>
        <desktop6:UninstallActions>
          <desktop6:UninstallAction File="Setup_AntiCheat.exe" Name="AC_1" Arguments="/remove /silent" />
        </desktop6:UninstallActions>
      </desktop6:CustomInstall>
    </desktop6:Extension>
  </Extensions>

  <Capabilities>
    <rescap:Capability Name="customInstallActions"/>
  </Capabilities>
</Package>

必要条件

アイテム 価値
名前空間 http://schemas.microsoft.com/appx/manifest/desktop/windows10/6
最小 OS バージョン Windows 10 バージョン 1903 (ビルド 18362)