我已在MDM中注册了Windows 10移动设备。我尝试按照文档中的说明安装业务线应用程序。
...........
<Replace>
<CmdID>2</CmdID>
<Item>
<Target>
<LocURI>./Vendor/MSFT/Policy/Config/ApplicationManagement/AllowAllTrustedApps</LocURI>
</Target>
<Meta>
<Format xmlns="syncml:metinf">int</Format>
<Type xmlns="syncml:metinf">text/plain</Type>
</Meta>
<Data>1</Data>
</Item>
</Replace>
<Add>
<CmdID>3</CmdID>
<Item>
<Target>
<LocURI>./Device/Vendor/MSFT/RootCATrustedCertificates/Root/1029F38A882AFB3B755342B08A87754C294895D1/EncodedCertificate</LocURI>
</Target>
<Data>MIIDEDCC.....a lot of more data....lRHvnE=</Data>
</Item>
</Add>
<Add>
<CmdID>4</CmdID>
<Item>
<Target>
<LocURI>./User/Vendor/MSFT/EnterpriseModernAppManagement/AppInstallation/29B91D81-19CB-41F7-97F3-FD56D2707EE9_cg4300pk5pzh2</LocURI>
</Target>
</Item>
</Add>
<Exec>
<CmdID>5</CmdID>
<Item>
<Target>
<LocURI>./User/Vendor/MSFT/EnterpriseModernAppManagement/AppInstallation/29B91D81-19CB-41F7-97F3-FD56D2707EE9_cg4300pk5pzh2/HostedInstall</LocURI>
</Target>
<Meta>
<Format xmlns="syncml:metinf">xml</Format>
</Meta>
<Data><Application DeploymentOptions="0" PackageUri="https://subdomain.domain.com:443/download/lobapp.appxbundle" /></Data>
</Item>
</Exec>
..........
该设备响应:
..........
<Status>
<CmdID>2</CmdID>
<MsgRef>4</MsgRef>
<CmdRef>2</CmdRef>
<Cmd>Replace</Cmd>
<Data>200</Data>
</Status>
<Status>
<CmdID>3</CmdID>
<MsgRef>4</MsgRef>
<CmdRef>3</CmdRef>
<Cmd>Add</Cmd>
<Data>200</Data>
</Status>
<Status>
<CmdID>4</CmdID>
<MsgRef>4</MsgRef>
<CmdRef>4</CmdRef>
<Cmd>Add</Cmd>
<Data>200</Data>
</Status>
<Status>
<CmdID>5</CmdID>
<MsgRef>4</MsgRef>
<CmdRef>5</CmdRef>
<Cmd>Exec</Cmd>
<Data>200</Data>
</Status>
.........
一切都很好。稍后我可以在下载服务器的日志中看到该设备确实下载了lobapp.appxbundle文件。但由于某种原因,它不被接受。我已经尝试了不同的Mime类型下载,我从我创建appxbundle的输出文件夹中取得了证书。该设备给出以下错误:
..........
<Results>
<CmdID>11</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>11</CmdRef>
<Item>
<Source>
<LocURI>./User/Vendor/MSFT/EnterpriseModernAppManagement/AppInstallation/29B91D81-19CB-41F7-97F3-FD56D2707EE9_cg4300pk5pzh2/LastError</LocURI>
</Source>
<Meta>
<Format xmlns="syncml:metinf">int</Format>
</Meta>
<Data>-2147009296</Data>
</Item>
</Results>
<Results>
<CmdID>13</CmdID>
<MsgRef>1</MsgRef>
<CmdRef>12</CmdRef>
<Item>
<Source>
<LocURI>./User/Vendor/MSFT/EnterpriseModernAppManagement/AppInstallation/29B91D81-19CB-41F7-97F3-FD56D2707EE9_cg4300pk5pzh2/LastErrorDesc</LocURI>
</Source>
<Data>error 0x8020001B: Opening the package from location lobApp.appxbundle failed.</Data>
</Item>
</Results>
...........
任何人都知道问题是什么?
好吧,为了知道你的包是否正常,使用powershell运行ps1安装脚本(在创建appx的文件夹中找到),如果没问题,下一个测试是使用PowerShell通过使用Add-AppxPackage
安装Appx(docu here) ,但是使用服务器的URL作为位置,如果无法安装appx,则可能导致下载过程无法正常工作,因为设备请求(在http标头上)要下载的字节范围和服务器可能没有正确地对应字节范围。
请记住在设备中安装Appx的证书,或者如果您可以使用有效的证书进行签名。
祝好运