@BPDIT Well, you can take a look in the registry, there should be a DigitalProductId somewhere in the subykey of SOFTWAREMicrosoftOffice15.0Registration
There was a missing "return" before SetError(1, 0, "Product not found"), so x64 products would show the same key on x86 OS.