KB ID 0001385
Problem
While doing some upgrades on a clients RDS farm this week, I needed to find out what version of Microsoft Office they were running. I’m not talking about Office 2013, Office 2016, etc, that’s easy to find out, (run appwiz.cpl and look in Add/Remove Programs). I’m taking about are you running a retail copy, or a volume licensed copy, or an Office 365 Office subscriptions copy.
Solution
For some time now every time Office has been installed it has installed a small vbs script that will tell you what you want to know, this script is called ospp.vbs. Where it lives, depends on two things;
- Are you running an x32 or x64 version of Microsoft Office.
- What Release of office are you running (2016, 2013, 2010 etc).
x64 bit versions of office ospp.vbs location
%installdir%\Program Files\Microsoft Office\Office{version number}
x32 bit versions of office ospp.vbs location
cscript “C:\program files (x86)\Microsoft Office\Office{version number}
Determine your Office {version number}
- OfficeXP: Office10
- Office 2003: Office11
- Office 2007: Office12
- Office 2010: Office14
- Office 2013: Office15
- Office2016: Office16
Armed with that information you can run the script, if you didn’t already know you execute .vbs scrips by calling them with the cscript command, so either change to the correct directory and execute the script directly, or use the full patch to the script in the command like so;
[box]
cd "C:\program files (x86)\Microsoft Office\Office16\" cscript ospp.vbs /dstatus OR cscript "C:\program files (x86)\Microsoft Office\Office16\ospp.vbs" /dstatus
[/box]
Examples;