desktop6:UninstallAction
指定在用户卸载桌面应用程序时运行的安装程序文件 (.exe
或 .msi
) 。
注意
此元素目前仅供打包在 MSIXVC 容器中的桌面电脑游戏使用。 它需要 customInstallActions受限功能。
元素层次结构
<desktop6:UninstallAction>
语法
<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.' />
特性和元素
属性
属性 | 说明 | 数据类型 | 必须 | 默认值 |
---|---|---|---|---|
File | 要执行 (.exe 或 .msi) 的文件的名称。 此文件必须存在于包中。 可以指定相对于 desktop6 的 Folder 属性的路径 。CustomInstall 元素。 不能指定绝对路径,并且相对路径不得以 \ 字符开头。 |
值长度介于 1 到 256 个字符之间的字符串,不能包含以下字符:< 、> 、: 、" 、| ? 、 或 * 。 |
是 | |
名称 | 卸载操作的名称。 此名称用于标识卸载操作,操作系统使用此名称跟踪已成功执行的操作。 确保此值与要作为同一序列的一部分运行的相应 desktop6:InstallAction 和 desktop6:RepairAction 元素的 属性匹配Name 。 此名称在父 desktop6:UninstallActions 元素中必须是唯一的,但它可由 desktop6:InstallActions 和 desktop6:RepairActions 元素下的其他操作共享。 |
值长度介于 1 到 32767 个字符之间的字符串,开头和结尾处有一个非空格字符。 | 是 | |
参数 | 要传递给安装程序文件的可选参数。 | 值长度介于 1 到 32767 个字符之间的字符串,开头和结尾处有一个非空格字符。 | 否 |
子元素
无
父元素
父元素 | 描述 |
---|---|
desktop6:UninstallActions | 指定在用户卸载桌面应用程序时运行的安装程序文件 (.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>
要求
项 | 值 |
---|---|
命名空间 | http://schemas.microsoft.com/appx/manifest/desktop/windows10/6 |
Minimum OS Version | Windows 10版本 1903 (内部版本 18362) |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈