Windows OEM License Activation
Published: September 22, 2021 - 5:56 PM
Good morning,
I'm sharing with you a small script for activating OEM licenses on Windows:
I'm sharing with you a small script for activating OEM licenses on Windows:
Code: Select all
# -- coding: utf-8 --
import time
from setuphelpers import *
uninstallkey = []
def install():
# commande powershell/cmd changement de clef windows + ajout de clef oem
key = run(r'''powershell $oem=(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey; echo $oem;''')
run(r'changepk /productkey {}'.format(key))
print("Windows Activation key : "+key)