desktop6:UninstallAction

Specifies an installer file (.exe or .msi) that is run when the user uninstalls your desktop application.

Note

This element is currently intended to be used only by desktop PC games that are packaged in an MSIXVC container. It requires the customInstallActions restricted capability.

Element hierarchy

<Package>

    <Extensions>

         <desktop6:Extension>

              <desktop6:CustomInstall>

                   <desktop6:UninstallActions>

                        <desktop6:UninstallAction>

Syntax

<desktop6:UninstallAction
  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.' />

Attributes and elements

Attributes

Attribute Description Data type Required Default value
File The name of the file to execute (.exe or .msi). This file must exist in your package. You can specify a path that is relative to the Folder attribute of the desktop6.CustomInstall element. You cannot specify an absolute path, and the relative path must not start with a \ character. A string with a value between 1 and 256 characters in length that cannot contain these characters: <, >, :, ", |, ?, or *. Yes
Name The name for the uninstall action. This name is used to identify the uninstall action, and the OS uses this name to track which actions have been successfully executed. Make sure that this value matches the Name attribute for the corresponding desktop6:InstallAction and desktop6:RepairAction elements that you want to run as part of the same sequence. This name must be unique in the parent desktop6:UninstallActions element, but it can be shared by other actions under the desktop6:InstallActions and desktop6:RepairActions elements. A string with a value between 1 and 32767 characters in length with a non-whitespace character at its beginning and end. Yes
Arguments Optional arguments to pass to the installer file. A string with a value between 1 and 32767 characters in length with a non-whitespace character at its beginning and end. No

Child elements

None

Parent elements

Parent element Description
desktop6:UninstallActions Specifies installer files (.exe or .msi) that are run when the user uninstalls your desktop application.

Remarks

This element requires the customInstallActions restricted capability.

Examples

<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>

Requirements

Item Value
Namespace http://schemas.microsoft.com/appx/manifest/desktop/windows10/6
Minimum OS Version Windows 10 version 1903 (Build 18362)