Here's the msofficekey.vbs output after the changes:
<OFFICEPACK>
<OFFICEVERSION>2003</OFFICEVERSION>
<PRODUCT>Microsoft Office Professional Enterprise Edition 2003</PRODUCT>
<PRODUCTID>XXXXX-XXX-XXXXXXX-XXXXX</PRODUCTID>
<TYPE>64</TYPE>
<OFFICEKEY>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</OFFICEKEY>
<GUID>{90110416-6000-11D3-8CFE-0150048383C9}</GUID>
<INSTALL>0</INSTALL>
<NOTE></NOTE>
</OFFICEPACK>
<OFFICEPACK>
<OFFICEVERSION>2007</OFFICEVERSION>
<PRODUCT>Microsoft Office Enterprise 2007</PRODUCT>
<PRODUCTID>XXXXX-XXX-XXXXXXX-XXXXX</PRODUCTID>
<TYPE>32</TYPE>
<OFFICEKEY>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</OFFICEKEY>
<GUID>{90120000-0030-0000-0000-0000000FF1CE}</GUID>
<INSTALL>0</INSTALL>
<NOTE></NOTE>
</OFFICEPACK>
<OFFICEPACK>
<OFFICEVERSION>2010</OFFICEVERSION>
<PRODUCT>Microsoft Office Home and Business 2010</PRODUCT>
<PRODUCTID>XXXXX-XXX-XXXXXXX-XXXXX</PRODUCTID>
<TYPE>32</TYPE>
<OFFICEKEY>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</OFFICEKEY>
<GUID>{90140000-003D-0000-0000-0000000FF1CE}</GUID>
<INSTALL>0</INSTALL>
<NOTE>HomeBusinessR</NOTE>
</OFFICEPACK>
<OFFICEPACK>
<OFFICEVERSION>2019</OFFICEVERSION>
<PRODUCT>Microsoft Office Home and Business 2019 - pt-br</PRODUCT>
<PRODUCTID>00404-47568-54363-AA336</PRODUCTID>
<TYPE>32</TYPE>
<OFFICEKEY>XXXXX-XXXXX-XXXXX-XXXXX-R62YT</OFFICEKEY>
<GUID>7fe09eef-5eed-4733-9a60-d7019df11cac</GUID>
<INSTALL>1</INSTALL>
<NOTE>HomeBusiness2019Retail</NOTE>
</OFFICEPACK>
Note that, for obvious reasons, I censored the ProductID and OfficeKey nodes with X's.
The code was also updated to detect Office C2R installations by querying the "SOFTWARE\Microsoft\Office\ClickToRun" subkey. If Office 2019+ is installed, now the code detect it's friendly name/edition (Microsoft Office Home and Business 2019 - pt-br) instead of reporting the "License Name" information from "OSPP.vbs".
The detection for older versions of Office was improved too. If they aren't installed, it was being reported it's wrong edition because instead of using the value from "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall" (that doesn't exists anymore, so obviously there's no Office key there), the script uses "ProductName" and "ConvertToEdition" values instead, but these values doesn't matches the edition of the Office that was really installed into the machine.
For Office 2010/2013, the script now detects the Office edition by parsing the "DigitalProductID" to extract it's SKU and comparing it with a list of well-known SKUs to determine the Office edition installed. Before this patch, it was detecting Office 2010 H&B as "Microsoft Office Professional 2010" (!), but it's not! It's Office Home & Business 2010.
For Office 2007 and older, the scripts avoids using the "ProductName" and "ConvertToEdition" values. This is a common assumption that happens even with ProduKey from NirSoft. The only software that I found so far that uses the GUID to properly detect the installed Office edition is NuclearCoffeeRecoverKeys. Now the script parses the edition based on the GUID of the key that contains the "DigitalProductID" binary value. E.g. Office 2003 "DigitalProductID" value is stored into [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Registration{90110416-6000-11D3-8CFE-0150048383C9}] key, so now the codes uses the Product GUID (90110416-6000-11D3-8CFE-0150048383C9) to properly detects the Office edition (based on Microsoft Documentation - it's editions well-known GUID is available at the header of this script) instead of relying into "ProductName" and "ConvertToEdition" values.
I've commited some changes into msofficekey.vbs to better support for Office FPP and C2R (Click-to-Run) installations.
Here's the output of msofficekey.vbs before:
Here's the msofficekey.vbs output after the changes:
Note that, for obvious reasons, I censored the ProductID and OfficeKey nodes with X's.
The code was also updated to detect Office C2R installations by querying the "SOFTWARE\Microsoft\Office\ClickToRun" subkey. If Office 2019+ is installed, now the code detect it's friendly name/edition (Microsoft Office Home and Business 2019 - pt-br) instead of reporting the "License Name" information from "OSPP.vbs".
The detection for older versions of Office was improved too. If they aren't installed, it was being reported it's wrong edition because instead of using the value from "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall" (that doesn't exists anymore, so obviously there's no Office key there), the script uses "ProductName" and "ConvertToEdition" values instead, but these values doesn't matches the edition of the Office that was really installed into the machine.