title: Check MS Office license status programmatically
body: <p>Is it possible to programmatically check MS Office (2007-2016) license status? (C++ preferable)</p>
  
  <p>I'll share with you my research below, maybe it will somehow help.</p>
  
  <p>I know that starting from office 2010 there is <code>OSPP.vbs</code> script to check license status. But since I can't use this script in my code (because of security issues), I'm using WMI to query LicenseStatus from SoftwareLicensingProduct information in C++ . </p>
  
  <p>The problem is that for 2013 office there are 36 licenses returned from the query (2 of them have keys - the first license stands for Word,Excel,PowerPoint, and the second for Visio). 
  For 2016 office there is a license for EACH office application (one for Word, one for Excel, one for Powerpoint and one more for Visio). One of them may expire earlier than another, while for 2013 office there is a common license for Word-Excel-PP and another for Visio. How can I unambiguously detect whether certain license 1) covers the Office application I'm using through object model 2) hasn't expired yet? 
  (Is there some kind of ID for each application which is availble in SoftwareLicensingProduct class?)</p>
  
  <p>N.B. <strong>The point is</strong> that I'm using Word, Excel, PowerPoint and Visio (2007-2016 versions) through object model in C++ and before starting any of the applications I need to know, whether their licenses have expired. </p>
  
  <p>I'll appreciate any help! Thank you in advance.</p>