On any machine we can have 1-3 different versions of MS Office installed, 2010, 2013, 2016 and the OS can be either x86 and x64  We wanted one CIR to report on to make it easy to search for specific lines in reporting by using "if contains or does not contain" filtering.

Here is the CIR I came up with:

thanks to flip1001 for the contriution!

ShellCommandTextReturn(c:\windows\system32\cscript //nologo "C:\Program Files\Microsoft Office\Office14\ospp.vbs" /dstatus > %g & c:\windows\system32\cscript //nologo "C:\Program Files\Microsoft Office\Office15\ospp.vbs" /dstatus >> %g & c:\windows\system32\cscript //nologo "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /dstatus >> %g & c:\windows\system32\cscript //nologo "C:\Program Files (x86)\Microsoft Office\Office14\ospp.vbs" /dstatus >> %g & c:\windows\system32\cscript //nologo "C:\Program Files (x86)\Microsoft Office\Office15\ospp.vbs" /dstatus >> %g & c:\windows\system32\cscript //nologo "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" /dstatus >> %g & findstr /B /V "Input Error" %g > %f & findstr /B /V "\-" %f)