在 Win 7 x86 和 x64 上检查 Outlook.exe 的 SCCM 集合查询

SCCM Collection Query to check Outlook.exe on Win 7 x86 and x64

我需要使用单个集合同时针对 win7(x86) 和 win7(x64) 构建来检查 Outlook.exe 是否安装在程序文件下,但问题出在 Win7(x86) 安装目录下在“C:\Program Files\”下,Win7(x64)安装目录在“C:\Program Files(x86)\”下,因此我无法使用一个集合

我在下面使用的脚本针对 Win7(x86) 而不是 Win7(x64) 有人可以帮助我进行 WMI 查询吗,我可以同时针对 Win7(x86) 和 (x64) 检查是否安装了 Outlook.exe

“SELECT SMS_R_SYSTEM.Client , SMS_R_SYSTEM.Name, SMS_R_SYSTEM.ResourceID, SMS_G_System_SoftwareFile.FilePath, SMS_G_System_SoftwareFile.FileName, SMS_G_System_SoftwareFile.FileVersion FROM SMS_R_System INNER JOIN SMS_G_System_SoftwareFile ON SMS_G_System_SoftwareFile.ResourceId = SMS_R_System.ResourceId WHERE SMS_G_System_SoftwareFile.FilePath LIKE "%Program Files\Microsoft Office\Office14\" AND SMS_G_System_SoftwareFile.FileName = “WINWORD.EXE”和 SMS_G_System_SoftwareFile.FileVersion 喜欢“14.%”

快完成了,试试这个:

SELECT 
SMS_R_SYSTEM.Client , SMS_R_SYSTEM.Name, SMS_R_SYSTEM.ResourceID,
SMS_G_System_SoftwareFile.FilePath, SMS_G_System_SoftwareFile.FileName,
SMS_G_System_SoftwareFile.FileVersion FROM SMS_R_System 
INNER JOIN SMS_G_System_SoftwareFile ON 
SMS_G_System_SoftwareFile.ResourceId = SMS_R_System.ResourceId 
WHERE 
(
   SMS_G_System_SoftwareFile.FilePath LIKE "%Program Files\Microsoft Office\Office14\" 
   OR 
   SMS_G_System_SoftwareFile.FilePath LIKE "%Program Files (x86)\Microsoft Office\Office14\"
) AND SMS_G_System_SoftwareFile.FileName = "outlook.exe"

这将包括这两个文件夹。我还用 "outlook.exe" 替换了你的 "WINWORD.EXE" 并删除了 FileVersion 检查,因为我会说如果它在 "Office14" 文件夹中,可以安全地假设它是版本 14。