Share via


desktop6:UninstallActions

Description

指定在使用者卸載傳統型應用程式時所執行的安裝程式檔案 (.exe.msi) 。

注意

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

元素階層

<套件>

    <擴充功能>

         <desktop6:Extension>

              <desktop6:CustomInstall>

                   <desktop6:UninstallActions>

Syntax

<desktop6:UninstallActions>

  <!-- Child elements -->
  desktop6:UninstallAction{0,100}

</desktop6:UninstallActions>

答案

{} 特定出現的範圍

屬性和元素

屬性

無。

子元素

子項目 描述
UninstallAction 指定在使用者卸載傳統型應用程式時執行的安裝程式檔案 (.exe 或 .msi) 。

父元素

父元素 描述
desktop6:CustomInstall 可讓傳統型應用程式指定隨桌面應用程式一起安裝的一或多個其他安裝程式檔案 (.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)