WinBatch Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: stanl on January 21, 2019, 04:22:20 am

Title: Win10 Product Key
Post by: stanl on January 21, 2019, 04:22:20 am
Code: Winbatch

strComputer = "."
oWMI = GetObject( "winmgmts:\\" : strComputer : "\root\cimv2")
WQL = 'SELECT * FROM SoftwareLicensingService'
oLicSvc = oWMI.ExecQuery(WQL)


ForEach m in oLicSvc
   v="Version: ":m.Version
   c="Client ID: ":m.ClientMachineID
   p="Product Key: ":m.OA3xOriginalProductKey
   k="KMS ID: ":m.KeyManagementServiceProductKeyID
   message("",v:@LF:c:@LF:p:@LF:k)
Next


oLicSvc=0
oWMI=0


Exit
 
Title: Re: Win10 Product Key
Post by: a14erman! on February 11, 2019, 05:54:20 am
Stanl,

Thank you.

a14erman!