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>

キー

? 省略可能 (0 または 1)

属性と要素

属性

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

子要素

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

親要素

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

注釈

この要素には、 customInstallActionsの制限付き機能が必要です。

OS では、Namedesktop6:InstallAction、desktop6:RepairActiondesktop6:UninstallAction 要素の属性を使用して、関連する一連のインストール、修復、アンインストールアクションを識別します。 相互に組み合わせて実行する必要があるアクションの関連セットを指定するには、 属性の値 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>

必要条件

Item
名前空間 http://schemas.microsoft.com/appx/manifest/desktop/windows10/6
Minimum OS Version Windows 10 バージョン 1903 (ビルド 18362)