Senso
Inventaris
- Lid geworden
- 13 jun 2016
- Berichten
- 11.229
- Besturingssysteem
- W10 Pro en W11 Pro
- Office versie
- Office 2007 H&S en Office 2021 Prof Plus
Via een batch file wil ik die opvragen maar die op internet cmd en powershell weren beide niet.
powershell "(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey"
werkt niet
wmic path softwareLicensingService get OA3xOriginalProductKey
werkt niet
Set WshShell = CreateObject("WScript.Shell")MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))Function ConvertToKey(Key)Const KeyOffset = 52i = 28Chars = "BCDFGHJKMPQRTVWXY2346789"DoCur = 0x = 14DoCur = Cur * 256Cur = Key(x + KeyOffset) + CurKey(x + KeyOffset) = (Cur \ 24) And 255Cur = Cur Mod 24x = x -1Loop While x >= 0i = i -1KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutputIf (((29 - i) Mod 6) = 0) And (i <> -1) Theni = i -1KeyOutput = "-" & KeyOutputEnd IfLoop While i >= 0ConvertToKey = KeyOutputEnd Function
werkt niet
powershell "(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey"
werkt niet
wmic path softwareLicensingService get OA3xOriginalProductKey
werkt niet
Set WshShell = CreateObject("WScript.Shell")MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))Function ConvertToKey(Key)Const KeyOffset = 52i = 28Chars = "BCDFGHJKMPQRTVWXY2346789"DoCur = 0x = 14DoCur = Cur * 256Cur = Key(x + KeyOffset) + CurKey(x + KeyOffset) = (Cur \ 24) And 255Cur = Cur Mod 24x = x -1Loop While x >= 0i = i -1KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutputIf (((29 - i) Mod 6) = 0) And (i <> -1) Theni = i -1KeyOutput = "-" & KeyOutputEnd IfLoop While i >= 0ConvertToKey = KeyOutputEnd Function
werkt niet