Share via


uap10:UpdateActions

對於使用 uap10:InstalledLocationVirtualization 擴充功能的 MSIX 套件中的傳統型應用程式,此元素會指定應用程式安裝目錄中先前修改、新增或刪除之應用程式安裝目錄中檔案的應用程式更新期間會發生什麼情況。

元素階層

<套件>

    <擴充功能>

         **\uap10:Extension>

              <uap10:InstalledLocationVirtualization>

                   <uap10:UpdateActions>

Syntax

<uap10:UpdateActions
    ModifiedItems = 'A string that can have one of the following values: "keep" or "reset".'
    DeletedItems = 'A string that can have one of the following values: "keep" or "reset".'
    AddedItems = 'A string that can have one of the following values: "keep" or "reset".' />

Attrbutes 和元素

屬性

屬性 描述 資料類型 必要 預設值
ModifiedItems 指定應用程式先前修改之應用程式安裝目錄中檔案的應用程式更新期間會發生什麼情況。 此屬性僅適用于安裝應用程式套件時存在的檔案。 具有下列其中一個值的字串:「keep」 或 「reset」。 Yes
DeletedItems 指定應用程式先前刪除之應用程式安裝目錄中檔案的應用程式更新期間會發生什麼情況。 此屬性僅適用于安裝應用程式套件時存在的檔案。 具有下列其中一個值的字串:「keep」 或 「reset」。 Yes
AddedItems 指定應用程式安裝之後,應用程式安裝目錄中檔案的應用程式更新期間會發生什麼情況。 具有下列其中一個值的字串:「keep」 或 「reset」。 Yes

子元素

父元素

父元素 描述
uap10:InstalledLocationVirtualization 定義 MSIX 套件中傳統型應用程式的延伸模組,將應用程式安裝目錄的任何寫入重新導向至 應用程式資料中的位置。 如需詳細資訊,請參閱 備註

備註

此元素只能在 uap10:InstalledLocationVirtualization 擴充功能的內容中使用。 此延伸模組會將任何寫入桌面 MSIX 應用程式的安裝目錄重新導向至 應用程式資料中的位置。

範例

<?xml
    version="1.0"
    encoding="utf-8"
    standalone="yes"?>
<Package
    xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
    xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10"
    IgnorableNamespaces="uap10">

  <!-- Other entries omitted for brevity. -->

    <Extensions>
        <uap10:Extension
            Category="windows.installedLocationVirtualization">
            <uap10:InstalledLocationVirtualization>
            <uap10:UpdateActions
                ModifiedItems="keep"
                DeletedItems="reset"
                AddedItems="keep"/>
            </uap10:InstalledLocationVirtualization>
        </uap10:Extension>
    </Extensions>
</Package>

規格需求

Item
Namespace http://schemas.microsoft.com/appx/manifest/uap/windows10/10
OS 最低版本 Windows 10版本 2004 (組建 19041)