EnterpriseDesktopAppManagement CSP

EnterpriseDesktopAppManagement 設定服務提供者可用來處理企業桌面應用程式管理工作,例如查詢已安裝的企業應用程式、安裝應用程式或移除應用程式。

應用程式安裝可能需要一些時間才能完成,因此會以異步方式完成。 當 Exec 命令完成時,用戶端可以傳送一般警示給管理伺服器,其狀態為失敗或成功。 如需 SyncML 範例,請參閱 警示範例

下列清單顯示 EnterpriseDesktopAppManagement 設定服務提供者節點:

裝置/MSI

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI

產品類型為 MSI。

描述架構屬性:

屬性名稱 屬性值
格式 node
存取類型 [取得]

Device/MSI/{ProductID}

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}

應用程式的 MSI 產品代碼。

描述架構屬性:

屬性名稱 屬性值
格式 node
存取類型 新增、刪除、取得
需要不可部分完成 True
動態節點命名 UniqueName:應用程式的 MSI 產品代碼。

Device/MSI/{ProductID}/DownloadInstall

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/DownloadInstall

執行應用程式的下載和安裝。 在 Windows 10 1703 版服務版本中,新的標籤<DownloadFromAad>已新增至 <Enforcement> XML 的 區段。 默認值為 0, (不傳送令牌) 。 此標籤是選擇性的,而且必須設定為 1,以防伺服器想要下載 URL 以取得 AADUserToken。

以下是範例:

<Enforcement>
  <CommandLine>/quiet</CommandLine>
  <TimeOut>5</TimeOut>
  <RetryCount>3</RetryCount>
  <RetryInterval>5</RetryInterval>
  <DownloadFromAad>1</DownloadFromAad>
</Enforcement>

如需詳細資訊,請 參閱 DownloadInstall XSD 架構

描述架構屬性:

屬性名稱 屬性值
格式 xml
存取類型 Add、Delete、Exec、Get

Device/MSI/{ProductID}/InstallDate

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/InstallDate

應用程式的安裝日期。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

Device/MSI/{ProductID}/InstallPath

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/InstallPath

應用程式的安裝路徑。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

Device/MSI/{ProductID}/LastError

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/LastError

應用程式安裝程式期間的最後一個錯誤碼。 這通常會儲存為 HRESULT 格式。 根據錯誤發生時所發生的狀況,這可能是執行 MSIExec.exe 的結果,或是 API 失敗的錯誤結果。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 [取得]

Device/MSI/{ProductID}/LastErrorDesc

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/LastErrorDesc

包含最後一個錯誤碼描述。 LastErrorDesc 值會查閱符合的 LastError 值。 有時不會傳回 LastErrorDesc。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

Device/MSI/{ProductID}/Name

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/Name

應用程式的名稱。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

Device/MSI/{ProductID}/Publisher

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10 版本 1511 [10.0.10586] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/Publisher

應用程式的發行者。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

Device/MSI/{ProductID}/Status

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10 版本 1511 [10.0.10586] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/Status

應用程式的狀態。 有效值:10-Initialized、20-Download In progress、25-Pending Download Retry、30-Download Failed、40-Download Completed、48-Pending User Session、50-Enforcement In Progress、55-Pending Enforcement Retry、60-Enforcement Failed、70-Enforcement Completed。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 [取得]

Device/MSI/{ProductID}/Version

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10 版本 1511 [10.0.10586] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/Version

MSI 產品版本。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

Device/MSI/UpgradeCode

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1607 [10.0.14393] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/UpgradeCode

描述架構屬性:

屬性名稱 屬性值
格式 node
存取類型 [取得]
區分大小寫 True

Device/MSI/UpgradeCode/{Guid}

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1607 [10.0.14393] 和更新版本
./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/UpgradeCode/{Guid}

網關 (或裝置管理伺服器) 會在 管理員 想要更新現有的 MSI 應用程式時,使用此方法來偵測相符的升級 MSI 產品。 如果已安裝相同的升級產品,則允許更新。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]
動態節點命名 ClientInventory

使用者/MSI

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI

產品類型為 MSI。

描述架構屬性:

屬性名稱 屬性值
格式 node
存取類型 [取得]

User/MSI/{ProductID}

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}

應用程式的 MSI 產品代碼。

描述架構屬性:

屬性名稱 屬性值
格式 node
存取類型 新增、刪除、取得
需要不可部分完成 True
動態節點命名 UniqueName:應用程式的 MSI 產品代碼。

User/MSI/{ProductID}/DownloadInstall

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/DownloadInstall

執行應用程式的下載和安裝。 在 Windows 10 1703 版服務版本中,新標記<DownloadFromAad>已新增至 <Enforcement> XML 的 區段。 默認值為 0, (不傳送令牌) 。 此標籤是選擇性的,而且必須設定為 1,以防伺服器想要下載 URL 以取得 AADUserToken。

以下是範例:

<Enforcement>
  <CommandLine>/quiet</CommandLine>
  <TimeOut>5</TimeOut>
  <RetryCount>3</RetryCount>
  <RetryInterval>5</RetryInterval>
  <DownloadFromAad>1</DownloadFromAad>
</Enforcement>

如需詳細資訊,請 參閱 DownloadInstall XSD 架構

描述架構屬性:

屬性名稱 屬性值
格式 xml
存取類型 Add、Delete、Exec、Get

User/MSI/{ProductID}/InstallDate

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/InstallDate

應用程式的安裝日期。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

User/MSI/{ProductID}/InstallPath

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/InstallPath

應用程式的安裝路徑。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

User/MSI/{ProductID}/LastError

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/LastError

應用程式安裝程式期間的最後一個錯誤碼。 這通常會儲存為 HRESULT 格式。 根據錯誤發生時所發生的狀況,這可能是執行 MSIExec.exe 的結果,或是 API 失敗的錯誤結果。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 [取得]

User/MSI/{ProductID}/LastErrorDesc

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/LastErrorDesc

包含最後一個錯誤碼描述。 LastErrorDesc 值會查閱符合的 LastError 值。 有時不會傳回 LastErrorDesc。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

User/MSI/{ProductID}/Name

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/Name

應用程式的名稱。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

User/MSI/{ProductID}/Publisher

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/Publisher

應用程式的發行者。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

User/MSI/{ProductID}/Status

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/Status

應用程式的狀態。 有效值:10-Initialized、20-Download In progress、25-Pending Download Retry、30-Download Failed、40-Download Completed、48-Pending User Session、50-Enforcement In Progress、55-Pending Enforcement Retry、60-Enforcement Failed、70-Enforcement Completed。

描述架構屬性:

屬性名稱 屬性值
格式 int
存取類型 [取得]

User/MSI/{ProductID}/Version

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1511 [10.0.10586] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{ProductID}/Version

MSI 產品版本。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]

User/MSI/UpgradeCode

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1607 [10.0.14393] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/UpgradeCode

描述架構屬性:

屬性名稱 屬性值
格式 node
存取類型 [取得]
區分大小寫 True

User/MSI/UpgradeCode/{Guid}

領域 版本 適用的作業系統
✅ 裝置
✅ 使用者
✅ 專業版
✅ 企業版
✅ 教育版
✅ Windows SE
✅ IoT 企業版 / IoT 企業版 LTSC
✅Windows 10,版本 1607 [10.0.14393] 和更新版本
./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/UpgradeCode/{Guid}

當 管理員 想要更新現有的 MSI 應用程式時,閘道 (或裝置管理伺服器) 會使用此方法來偵測相符的升級 MSI 產品。 如果已安裝相同的升級產品,則允許更新。

描述架構屬性:

屬性名稱 屬性值
格式 chr (字串)
存取類型 [取得]
動態節點命名 ClientInventory

DownloadInstall XSD 架構

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Data">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="MsiInstallJob">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Product">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Download">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="ContentURLList">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element maxOccurs="unbounded" name="ContentURL" type="xs:string" />
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="Validation">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="FileHash" type="xs:string" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="Enforcement">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="CommandLine" type="xs:string" />
                          <xs:element name="TimeOut" type="xs:unsignedByte" />
                          <xs:element name="RetryCount" type="xs:unsignedByte" />
                          <xs:element name="RetryInterval" type="xs:unsignedByte" />
                          <xs:element name="DownloadFromAad" type="xs:unsignedByte" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="Version" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="id" type="xs:string" use="required" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

範例

  • SyncML 以要求 CSP 版本資訊:

    <SyncML xmlns="SYNCML:SYNCML1.1">
      <SyncBody>
        <Get>
          <CmdID>12345</CmdID>
          <Item>
            <Target>
              <LocURI>./Device/Vendor/MSFT/EnterpriseDesktopAppManagement?prop=Type</LocURI>
            </Target>
          </Item>
        </Get>
        <Final/>
      </SyncBody>
    </SyncML>
    

    下表描述上一個範例中的欄位:

    名稱 描述
    [取得] 正在執行的作業。 取得作業是傳回資訊的要求。
    CmdID 用來參考要求的輸入值。 回應會包含這個值,可用來比對要求和回應。
    LocURI Win32 CSP 命令處理器的路徑。
  • SyncML 以執行應用程式卸載的 MSI 作業:

    <SyncML xmlns="SYNCML:SYNCML1.1">
      <SyncBody>
        <Delete>
          <CmdID>12345</CmdID>
          <Item>
            <Target>
              <LocURI>./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/%7B1803A630-3C38-4D2B-9B9A-0CB37243539C%7D</LocURI>
            </Target>
          </Item>
        </Delete>
        <Final/>
      </SyncBody>
    </SyncML>
    

    下表描述上一個範例中的欄位:

    名稱 描述
    刪除 正在執行的作業。 刪除作業是刪除代表指定 MSI 已安裝應用程式的 CSP 節點,以及在程式中執行和卸載應用程式的要求。
    CmdID 用來參考要求的輸入值。 回應會包含這個值,可用來比對要求和回應。
    LocURI Win32 CSP 命令處理器的路徑,包括此範例中的產品標識碼 (,1803A630-3C38-4D2B-9B9A-0CB37243539C) 屬性會針對 XML 格式化逸出。
  • SyncML 以執行應用程式狀態報告的 MSI 作業:

    <SyncML xmlns="SYNCML:SYNCML1.1">
      <SyncBody>
        <Get>
          <CmdID>12345</CmdID>
          <Item>
            <Target>
              <LocURI>./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/%7B1803A630-3C38-4D2B-9B9A-0CB37243539C%7D</LocURI>
            </Target>
          </Item>
        </Get>
        <Final/>
      </SyncBody>
    </SyncML>
    

    下表描述上一個範例中的欄位:

    名稱 描述
    [取得] 正在執行的作業。 取得作業是報告所指定 MSI 已安裝應用程式狀態的要求。
    CmdID 用來參考要求的輸入值。 回應會包含這個值,可用來比對要求和回應。
    LocURI Win32 CSP 命令處理器的路徑,包括此範例中的產品標識碼 (,1803A630-3C38-4D2B-9B9A-0CB37243539C) 屬性會針對 XML 格式化逸出。
  • SyncML,針對裝置上特定使用者的應用程式執行 MSI 安裝作業。 在 Exec 命令之前必須要有 Add 命令。

    <SyncML xmlns="SYNCML:SYNCML1.1">
      <SyncBody>
        <Add>
          <CmdID>1</CmdID>
          <Item>
            <Target>
            <LocURI>./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/%7B1803A630-3C384D2B-9B9A-0CB37243539C%7D/DownloadInstall</LocURI>
            </Target>
          </Item>
        </Add>
        <Exec>
          <CmdID>6</CmdID>
          <Item>
            <Target>
              <LocURI>./User/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/%7B1803A630-3C38-4D2B-9B9A-0CB37243539C%7D/DownloadInstall</LocURI>
            </Target>
            <Meta>
              <Format xmlns="syncml:metinf">xml</Format>
              <Type xmlns="syncml:metinf">text/plain</Type>
            </Meta>
            <Data>
              <MsiInstallJob id="{9BD4F7CD-880A-40B5-B74C-1BEECB51E596}">
                <Product Version="1.0.0">
                  <Download>
                    <ContentURLList>
                      <ContentURL>
                        http://bcl-w2k12r2-vm/testapps/msi/reboot/reboot.msi
                      </ContentURL>
                      <ContentURL>https://dp2.com/packages/myApp.msi</ContentURL>
                    </ContentURLList>
                  </Download>
                  <Validation>
                  <FileHash>134D8F1F7C3C036DC3DCDA9F97515C8C7951DB154B73365C9C22962BD23E3EB3</FileHash>
                  </Validation>
                  <Enforcement>
                    <CommandLine>/quiet</CommandLine>
                    <TimeOut>5</TimeOut>
                    <RetryCount>3</RetryCount>
                    <RetryInterval>5</RetryInterval>
                  </Enforcement>
                </Product>
              </MsiInstallJob>
            </Data>
          </Item>
        </Exec>
        <Final/>
      </SyncBody>
    </SyncML>
    

    下表描述上一個範例中的欄位:

    名稱 描述
    新增 此欄位必須在 Exec 命令之前。
  • CmdID - 用來參考要求的輸入值。 回應包含此值,可用來比對要求和回應。
  • LocURI - Win32 CSP 命令處理器的路徑,包括此範例中的產品標識碼 (,1803A630-3C38-4D2B-9B9A-0CB37243539C) 屬性會針對 XML 格式化逸出。
  • Exec Exec 節點包含尋找、下載、驗證及執行產品安裝所需的參數和屬性。
  • CmdID - 用來參考要求的輸入值。 回應會包含這個值,可用來比對要求和回應。
  • LocURI - Win32 CSP 命令處理器的路徑,包括此範例中的產品標識碼 (,1803A630-3C38-4D2B-9B9A-0CB37243539C) 屬性會針對 XML 格式化逸出。
  • 數據 - 資料節點包含類型為 「MsiInstallJob」 的內嵌 XML
  • MsiInstallJob - 包含成功下載、驗證和執行 MSI 安裝程式所需的所有資訊 (如需此內嵌數據物件) 的詳細資訊,請參閱本檔結尾的章節。
  • 注意

    將使用標準 OMA-DM 通知機制報告 MSI 作業的信息狀態。 報告的狀態會使用標準 MSIEXEC 傳回碼來表示,如 Msiexec 上的 Microsoft TechNet 上的 MSIEXEC 主題中所定義的 HRESULT (命令行選項)

  • SyncML 可針對裝置上所有使用者的目標應用程式執行 MSI 安裝作業, (每個裝置安裝) :

    <SyncML xmlns="SYNCML:SYNCML1.1">
      <SyncBody>
        <Add>
          <CmdID>1</CmdID>
          <Item>
            <Target>
              <LocURI>./Device /Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/%7B6F7CB29F-1319-4816-B345-0856916EB801%7D/DownloadInstall
              </LocURI>
          </Target>
        </Item>
      </Add>
        <Exec>
          <CmdID>67890</CmdID>
          <Item>
            <Target>
              <LocURI>./Device /Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/%7B6F7CB29F-1319-4816-B345-0856916EB801%7D/DownloadInstall</LocURI>
            </Target>
            <Meta>
              <Format xmlns="syncml:metinf">xml</Format>
              <Type xmlns="syncml:metinf">text/plain</Type>
            </Meta>
            <Data>
              <MsiInstallJob id="{9BD4F7CD-880A-40B5-B74C-1BEECB51E596}">
                <Product Version="1.0.0">
                  <Download>
                    <ContentURLList>
                      <ContentURL>http://bcl-w2k12r2-vm/testapps/msi/Orca/Orca.msi</ContentURL>
                      <ContentURL>https://dp2.com/packages/myApp.msi</ContentURL>
                    </ContentURLList>
                  </Download>
                  <Validation>
                    <FileHash>4525065777EF18B9444ABF71DD4B48E5F64F4F0E1E029995FB8DA441CDE4296E</FileHash>
                  </Validation>
                  <Enforcement>
                    <CommandLine>/quiet</CommandLine>
                    <TimeOut>5</TimeOut>
                    <RetryCount>3</RetryCount>
                    <RetryInterval>5</RetryInterval>
                  </Enforcement>
                </Product>
              </MsiInstallJob>
            </Data>
          </Item>
        </Exec>
        <Final/>
      </SyncBody>
    </SyncML>
    

    下表 MsiInstallJob 描述架構元素。

    元素 描述
    MsiInstallJob root 元素
    屬性:「id」 - 所安裝應用程式的應用程式識別碼
    產品 MsiInstallJob 的子元素
    屬性:「Version」 - 應用程式版本的字串表示法
    下載 Product 的子元素。 用於下載設定資訊的容器。
    ContentURLList Download 的子專案。 包含一或多個內容下載 URL 定位器的清單,格式為 ContentURL 元素。
    ContentURL 應從下載位置內容。 必須是指向 .MSI 檔案的屬性格式化URL。
    驗證 包含用來驗證競爭真確性的資訊。 • FileHash - 檔案內容的 SHA256 哈希值
    FileHash 檔案內容的SHA256哈希值
    強制執行 安裝此 MSI 時要使用的安裝屬性
    CommandLine 呼叫 MSIEXEC.exe 時要使用的命令行選項
    超時 在安裝程式認為安裝可能失敗且不再監視安裝作業之前,安裝程式可以執行的分鐘數時間量。
    RetryCount 在安裝標記為失敗之前,將會重試下載和安裝作業的次數。
    RetryInterval 重試作業之間的時間量,以分鐘為單位。

    以下是一般回應要求的範例

    <?xml version="1.0" encoding="utf-16"?>
    <SyncML>
      <SyncHdr />
      <SyncBody>
        <Status>
          <CmdID>12345</CmdID>
          <MsgRef>1</MsgRef>
          <CmdRef>0</CmdRef>
          <Cmd>SyncHdr</Cmd>
          <Data>200</Data>
        </Status>
        <Status>
          <CmdID>67890</CmdID>
          <MsgRef>1</MsgRef>
          <CmdRef>1</CmdRef>
          <Cmd>Add</Cmd>
          <Data>200</Data>
        </Status>
        <Final />
      </SyncBody>
    </SyncML>
    

如何判斷要用於 MSI 套件的安裝內容

下表顯示如何在用戶端中安裝應用程式目標和 MSI 套件類型 (每位使用者、每部電腦或雙重模式) 。

針對 Intune 獨立環境,MSI 套件會決定 MSI 執行內容。

Target 每位使用者 MSI 每部電腦 MSI 雙重模式 MSI
使用者 安裝每位使用者的 MSI
LocURI 包含使用者前置詞,例如 ./User
安裝每個裝置的 MSI
LocURI 包含裝置前置詞,例如 ./Device
安裝每位使用者的 MSI
LocURI 包含使用者前置詞,例如 ./User
系統 安裝每位使用者的 MSI
LocURI 包含使用者前置詞,例如 ./User
安裝每個裝置的 MSI
LocURI 包含裝置前置詞,例如 ./Device
安裝每位使用者的 MSI
LocURI 包含使用者前置詞,例如 ./User

下表適用於混合式環境 Configuration Manager:

Target 每位使用者 MSI 每部電腦 MSI 雙重模式 MSI
使用者 安裝每位使用者的 MSI
LocURI 包含使用者前置詞,例如 ./User
安裝每個裝置的 MSI
LocURI 包含裝置前置詞,例如 ./Device
安裝每位使用者的 MSI
LocURI 包含使用者前置詞,例如 ./User
系統 安裝每位使用者的 MSI
LocURI 包含使用者前置詞,例如 ./User
安裝每個裝置的 MSI
LocURI 包含裝置前置詞,例如 ./Device
安裝 MSI 個別系統內容
LocURI 包含裝置前置詞,例如 ./Device

如何從 MSI 套件判斷套件類型

  • ALLUSERS=“” - 每位使用者套件類型
  • ALLUSERS=1 - 每部計算機套件類型
  • ALLUSERS=2,MSIINSTALLPERUSER=1 - 雙重模式套件類型

您可以在套件中指定屬性、透過命令行傳遞、由轉換修改,或 (更常透過使用者介面對話框選取) 。

以下是參考清單:

警示範例

<Alert>
   <CmdID>4</CmdID>
   <Data>1224</Data>
   <Item>
      <Source>
         <LocURI>./Device/Vendor/MSFT/EnterpriseDesktopAppManagement/MSI/{AF9257BA-6BBD-4624-AA9B-0182D50292C3}/DownloadInstall</LocURI>
      </Source>
      <Meta>
         <Type xmlns="syncml:metinf">Reversed-Domain-Name:com.microsoft.mdm.win32csp_install</Type>
         <Format xmlns="syncml:metinf">int</Format>
         <Mark xmlns="syncml:metinf">informational</Mark>
      </Meta>
      <Data>0</Data>
   </Item>
</Alert>

設定服務提供者參考