我正在为 Office 365 创建 SCCM 2012 R2 应用程序。安装工作正常(退出时代码为 0),但应用程序检测失败。在测试中,我尝试注册表检测(按照这篇 TechNet 文章以及具有“OR”关系的文件夹检测(因为注册表不起作用);如果找到任何一个,就应该标记为成功。
在软件包安装并“检测失败”后,如果我查看文件系统和注册表,则检测中使用的两个条目是在那里。我可以在 AppDiscovery.log 中看到它正在尝试检测但失败了,但它并没有向我展示它到底在测试什么以及它从操作系统中得到了什么。我最初在 32 位 Windows 上测试 32 位 Office,所以 32 位与 64 位不是问题。我不知道下一步该看什么;希望有人能帮我找到答案?
应用程序检测(具有“或”关系):
Registry: HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\O365ProPlusRetail - en-us
Filesystem: C:\Program Files\Microsoft Office 15\root\office15
AppDiscovery.log:
<![LOG[Entering ExecQueryAsync for query "select * from CCM_AppDeliveryType where (AppDeliveryTypeId = "ScopeId_C0FD4C5A-19CA-4D29-AE82-1FC626708B30/DeploymentType_306fa062-57f5-4481-b17a-8e9caeeba49f" AND Revision = 6)"]LOG]!><time="15:15:24.396-600" date="03-08-2016" component="AppDiscovery" context="" type="1" thread="156" file="appprovider.cpp:406">
<![LOG[ Performing detection of app deployment type Install - Microsoft Office 365 ProPlus x86(ScopeId_C0FD4C5A-19CA-4D29-AE82-1FC626708B30/DeploymentType_306fa062-57f5-4481-b17a-8e9caeeba49f, revision 6) for user.]LOG]!><time="15:15:24.399-600" date="03-08-2016" component="AppDiscovery" context="" type="1" thread="156" file="appprovider.cpp:2148">
<![LOG[+++ Application not discovered. [AppDT Id: ScopeId_C0FD4C5A-19CA-4D29-AE82-1FC626708B30/DeploymentType_306fa062-57f5-4481-b17a-8e9caeeba49f, Revision: 6]]LOG]!><time="15:15:24.416-600" date="03-08-2016" component="AppDiscovery" context="" type="1" thread="156" file="localapphandler.cpp:291">
<![LOG[+++ Did not detect app deployment type Install - Microsoft Office 365 ProPlus x86(ScopeId_C0FD4C5A-19CA-4D29-AE82-1FC626708B30/DeploymentType_306fa062-57f5-4481-b17a-8e9caeeba49f, revision 6) for S-1-5-21-977620602-469372654-314601362-40834.]LOG]!><time="15:15:24.416-600" date="03-08-2016" component="AppDiscovery" context="" type="1" thread="156" file="appprovider.cpp:540">
AppEnforce.log:
<![LOG[+++ Starting Install enforcement for App DT "Install - Microsoft Office 365 ProPlus x86" ApplicationDeliveryType - ScopeId_C0FD4C5A-19CA-4D29-AE82-1FC626708B30/DeploymentType_306fa062-57f5-4481-b17a-8e9caeeba49f, Revision - 5, ContentPath - C:\WINDOWS\ccmcache\2, Execution Context - System]LOG]!><time="14:55:26.517-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appprovider.cpp:1702">
<![LOG[ A user is logged on to the system.]LOG]!><time="14:55:26.517-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appprovider.cpp:2083">
<![LOG[ Performing detection of app deployment type Install - Microsoft Office 365 ProPlus x86(ScopeId_C0FD4C5A-19CA-4D29-AE82-1FC626708B30/DeploymentType_306fa062-57f5-4481-b17a-8e9caeeba49f, revision 5) for user.]LOG]!><time="14:55:26.521-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appprovider.cpp:2148">
<![LOG[+++ Application not discovered. [AppDT Id: ScopeId_C0FD4C5A-19CA-4D29-AE82-1FC626708B30/DeploymentType_306fa062-57f5-4481-b17a-8e9caeeba49f, Revision: 5]]LOG]!><time="14:55:26.574-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="localapphandler.cpp:291">
<![LOG[ App enforcement environment:
Context: Machine
Command line: Setup.exe /configure Install.xml
Allow user interaction: No
UI mode: 1
User token: not null
Session Id: 1
Content path: C:\WINDOWS\ccmcache\2
Working directory: ]LOG]!><time="14:55:26.574-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appcontext.cpp:85">
<![LOG[ Prepared working directory: C:\WINDOWS\ccmcache\2]LOG]!><time="14:55:26.580-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appcontext.cpp:189">
<![LOG[ Prepared command line: "C:\WINDOWS\ccmcache\2\setup.exe" /configure Install.xml]LOG]!><time="14:55:26.581-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appcontext.cpp:338">
<![LOG[ Executing Command line: "C:\WINDOWS\ccmcache\2\setup.exe" /configure Install.xml with user context]LOG]!><time="14:55:26.582-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appexcnlib.cpp:205">
<![LOG[ Working directory C:\WINDOWS\ccmcache\2]LOG]!><time="14:55:26.582-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appexcnlib.cpp:219">
<![LOG[ Post install behavior is BasedOnExitCode]LOG]!><time="14:55:26.799-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appcommon.cpp:1094">
<![LOG[ Waiting for process 3624 to finish. Timeout = 15 minutes.]LOG]!><time="14:55:26.802-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appexcnlib.cpp:2015">
<![LOG[ Process 3624 terminated with exitcode: 0]LOG]!><time="15:00:02.687-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appexcnlib.cpp:2024">
<![LOG[ Looking for exit code 0 in exit codes table...]LOG]!><time="15:00:02.688-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appexcnlib.cpp:508">
<![LOG[ Matched exit code 0 to a Success entry in exit codes table.]LOG]!><time="15:00:02.688-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appexcnlib.cpp:587">
<![LOG[ Performing detection of app deployment type Install - Microsoft Office 365 ProPlus x86(ScopeId_C0FD4C5A-19CA-4D29-AE82-1FC626708B30/DeploymentType_306fa062-57f5-4481-b17a-8e9caeeba49f, revision 5) for user.]LOG]!><time="15:00:02.762-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appprovider.cpp:2148">
<![LOG[+++ Application not discovered. [AppDT Id: ScopeId_C0FD4C5A-19CA-4D29-AE82-1FC626708B30/DeploymentType_306fa062-57f5-4481-b17a-8e9caeeba49f, Revision: 5]]LOG]!><time="15:00:02.955-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="localapphandler.cpp:291">
<![LOG[++++++ App enforcement completed (276 seconds) for App DT "Install - Microsoft Office 365 ProPlus x86" [ScopeId_C0FD4C5A-19CA-4D29-AE82-1FC626708B30/DeploymentType_306fa062-57f5-4481-b17a-8e9caeeba49f], Revision: 5, User SID: S-1-5-21-977620602-469372654-314601362-40834] ++++++]LOG]!><time="15:00:02.961-600" date="03-08-2016" component="AppEnforce" context="" type="1" thread="1904" file="appprovider.cpp:2450">
编辑:根据要求的检测规则的截图:
答案1
因此,从记录来看,阅读了相当多的内容似乎表明检测方法并不可靠;对某些人有用的方法对其他人却不起作用。我已将其从基于注册表的检测切换到基于 MSI 代码的检测,结果发现这在 Office 365 (2016) 中不起作用,因为它似乎没有“安装”ProPlus 包,只有一些辅助包。
这个故事的寓意似乎是尝试不同的方法,找到适合自己的方法,然后使用。对于每个人来说,没有“最佳”方法的硬性规定。
另外,顺便说一句,在上面的文件系统屏幕截图中,我错过了配置它以查找文件,但我为其提供了一个文件夹。重新配置文件夹似乎有效。我仍然不明白为什么注册表检测不起作用,但我已经克服了当前的障碍。