How would I go about extracting the Windo开发者_JS百科ws OEM Key from the Registry and saving it to a file.
You're well into unsupported territory here. The product key is stored in encrypted form in the registry. You might want to look at Magical Jellybean Keyfinder's code, which is available under the GPL.
精彩评论