Activation Windows licence OEM
Publié : 22 sept. 2021 - 17:56
Bonjour,
je partage avec vous un petit script pour l'activation des licences OEM sur windows :
je partage avec vous un petit script pour l'activation des licences OEM sur windows :
Code : Tout sélectionner
# -- 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)