Here’s a little command line tool to retrieve the product key from a running Windows 8. It should also work on Windows XP through 7. I am releasing the code into the public domain. I hope I got it right, but it’s possible that some edge cases aren’t covered properly. If you are a developer yourself, go and fix the issue yourself and send me a patch against the code from the Mercurial repo. Fixing other issues would require that you send me the product key and the respective registry key. I’d rather not have that …
REDISTRIBUTION TERMS: The source is of course included. The whole package is released into the PUBLIC DOMAIN.
Disclaimer: This software is provided ‘as-is’, without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software.