desktop7:Shortcut

创建文件的快捷方式。

元素层次结构

<包>

     <应用程序>

          <应用程序>

               <扩展>

                    <desktop7:扩展>

                         <desktop7:Shortcut>

语法

<desktop7:Shortcut
    File =  'A string with a value between 1 and 256 characters in length that cannot contain these characters: <, >, :, ", |, ?, or *.'
    Icon = 'A string with a value between 1 and 256 characters in length that cannot contain these characters: <, >, :, ", |, ?, or *.'
    Arguments = 'An optional string with a value between 1 and 256 characters in length.'
    PinToStartMenu = 'A boolean value.'
    ExcludeFromShowInNewInstall = 'A boolean value.'
    Description = 'A string with a value between 1 and 2048 characters in length.'
    desktop10:DisplayName = 'An optional string with a value between 1 and 256 characters in length. This string is localizable.'
    desktop10:Description = 'An optional string with a value between 1 and 2048 characters in length. This string is localizable.' >

    desktop7:AppMigrations?

</desktop7:Shortcut>

密钥

? 可选(零或一)

属性和元素

特性

特征 DESCRIPTION 数据类型 必选 默认值
文件 快捷方式目标的文件的路径。 长度在 1 到 256 个字符之间的字符串,其长度不能包含这些字符:<>:"|?* 是的
图标 快捷方式图标的文件的路径。 长度在 1 到 256 个字符之间的字符串,其长度不能包含这些字符:<>:"|?* 是的
论点 快捷方式的参数。 长度介于 1 到 256 个字符之间的值的可选字符串。
PinToStartMenu 一个布尔值,指定快捷方式是否固定到“开始”菜单。 布尔值。
ExcludeFromShowInNewInstall 一个布尔值,指定是否应从应用于新安装的应用的突出显示中排除快捷方式。 布尔值。
说明 快捷方式的说明。 长度介于 1 到 2048 个字符之间的字符串。
desktop10:DisplayName 快捷方式的显示名称。 长度介于 1 到 256 个字符之间的值的可选字符串。 此字符串可本地化。
desktop10:Description 快捷方式的可本地化说明。 长度介于 1 到 2048 个字符之间的值的可选字符串。 此字符串可本地化。

子元素

子元素 DESCRIPTION
desktop7:AppMigrations 为最近卸载的应用指定停用的快捷方式的一组应用迁移条目。

父元素

父元素 DESCRIPTION
扩展 定义应用程序的扩展点。

注解

文件路径格式是相对于解析为目录的下列常量之一的路径。

恒定 目录
常见程序 C:\ProgramData\Microsoft\Windows\Start Menu\Programs
项目 C:\Users<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
桌面 C:\Users<username>\Desktop

因此,例如, File 的以下值使用路径 C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Subfolder\Shortcut.exe.lnk创建快捷方式。

File="$$(Programs)\Subfolder\Shortcut.exe.lnk"

要求

条目 价值
Namespace http://schemas.microsoft.com/appx/manifest/desktop/windows10/7
desktop10 http://schemas.microsoft.com/appx/manifest/desktop/windows10/10
最低 OS 版本 Windows 10 (内部版本 19645)