desktop6:CustomInstall
可讓傳統型應用程式指定隨桌面應用程式一起安裝的一或多個其他安裝程式檔案 (.exe 或 .msi) 。 例如,這適用于組合協力廠商可轉散發元件的應用程式。
注意
此元素目前僅供 Microsoft 和合作夥伴發行的特定桌上型電腦遊戲類型使用。 它需要 customInstallActions受限制的功能。
元素階層
<desktop6:CustomInstall>
Syntax
<desktop6:CustomInstall
Folder = 'A string with a value between 1 and 256 characters in length that cannot contain these characters: <, >, :, ", |, ?, or *.'
desktop8:RunAsUser = 'An optional boolean value.'>
<!-- Child elements -->
desktop6:InstallActions
desktop6:RepairActions
desktop6:UninstallActions?
</desktop6:CustomInstall>
答案
?
選擇性 (零或一個)
屬性和元素
屬性
屬性 | 描述 | 資料類型 | 必要 | 預設值 |
---|---|---|---|---|
資料夾 | 封裝資料夾的名稱,其中包含所有自訂動作所需的所有檔案。 此資料夾可能包含子資料夾。 | 長度介於 1 到 256 個字元之間的字串,不能包含下列字元: < 、、 > 、 : | " 、、 ? 或 。 * |
Yes |
子元素
子項目 | 描述 |
---|---|
InstallActions | 指定在第一次啟動傳統型應用程式之前執行的安裝程式檔案。 |
RepairActions | 指定當使用者在傳統型應用程式的 [設定] 頁面中選取修復或重設選項時所執行的安裝程式檔案。 |
UninstallActions | 指定使用者卸載傳統型應用程式時所執行的安裝程式檔案。 |
父元素
父元素 | 描述 |
---|---|
desktop6:Extension | 宣告傳統型應用程式的擴充點。 |
desktop8:RunAsUser | 指出是否應該以目前使用者身分執行工作。 |
備註
此元素需要 customInstallActions受限制的功能。
OS 會使用desktop6:InstallAction、desktop6:RepairAction和desktop6:UninstallAction元素的屬性來識別一組相關的安裝、修復和卸載動作。 Name
若要指定應該與彼此一起執行的一組相關動作,請確定它們與 屬性具有相同的值 Name
。 只有在已執行對應的安裝或修復動作時,OS 才會執行卸載動作。
範例
<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) |
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應