Share via


desktop6:RepairAction

指定當使用者在傳統型應用程式的 [設定] 頁面中選取修復或重設選項時所執行的安裝程式檔案 (.exe 或 .msi) 。

注意

此元素目前僅供 MSIXVC 容器中封裝的桌上型電腦遊戲使用。 它需要 customInstallActions受限制的功能

元素階層

<套件>

    <擴充功能>

         <desktop6:Extension>

              <desktop6:CustomInstall>

                   <desktop6:RepairActions>

                        <desktop6:RepairAction>

Syntax

<desktop6:RepairAction
  File = 'A string with a value between 1 and 256 characters in length that cannot contain these characters: <, >, :, ", |, ?, or *.'
  Name = 'A string with a value between 1 and 32767 characters in length with a non-whitespace character at its beginning and end.'
  Arguments = 'A string with a value between 1 and 32767 characters in length with a non-whitespace character at its beginning and end.' />

屬性和元素

屬性

屬性 描述 資料類型 必要 預設值
檔案 要執行 (.exe 或 .msi) 的檔案名。 此檔案必須存在於您的套件中。 您可以指定相對於 desktop6 之 Folder 屬性的路徑 。CustomInstall 元素。 您無法指定絕對路徑,而且相對路徑不得以 \ 字元開頭。 長度介於 1 到 256 個字元之間的字串,不能包含下列字元: < 、、、 :>"|?* Yes
名稱 修復動作的名稱。 此名稱用來識別修復動作,而 OS 會使用此名稱來追蹤已成功執行的動作。 請確定這個值符合 Name 對應desktop6:InstallAction 和 desktop6:UninstallAction元素的屬性,而您要以相同序列的一部分執行。 此名稱在父Desktop6:RepairActions元素中必須是唯一的,但可由desktop6:InstallActions 和 desktop6:UninstallActions元素下的其他動作共用。 長度介於 1 到 32767 個字元之間的字串,其開頭和結尾具有非空白字元。 Yes
引數 要傳遞至安裝程式檔案的選擇性引數。 長度介於 1 到 32767 個字元之間的字串,其開頭和結尾具有非空白字元。 No

子元素

父元素

Parent 項目 Description
desktop6:RepairActions 指定當使用者在傳統型應用程式的 [設定] 頁面中選取修復或重設選項時所執行的安裝程式檔案 (.exe 或 .msi) 。

備註

這個專案需要 customInstallActions受限制的功能

範例

<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
OS 最低版本 Windows 10版本 1903 (組建 18362)