Hi, I'm trying to read the ProductKey from the MSDM Table & work out what edition it is from WinPE (64bit). I've been unable to find any way to do this. Within Windows there are tools: - RW-Everything can view the MSDM table. You can script it to dump the Table from a batch file. Can't get it to run in WinPE. - OEM-DM can display the key. - The Ulitmate PID Checker can give me the info I need. Doesn't have command line options though. Not all notebooks/PC's have a Win8/Win8Pro sticker on them so it would be handy to just boot up my WinPE & get a dump/info if a MSDM table exists. Or would I have to go with WinSE for this???
Using myself Win8.1SE from 'The Oven' (http://theoven.org/index.php?PHPSESSID=e0636e25e5b32109183ef30053d03150&topic=774.0). RWEverything works with it .
Thanks S1ave77, I've had a play with this already as I'm following the UEFI Backup thread. It's something to consider...
Ok, using Win8.1SE & woot332's Windows-9-Product-Key-Viewer I'm now able to retrieve the OEM-DM Key. Using the following from a command prompt worked as well: Code: powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey" *Update* Sorry, the above powershell command does NOT work in the WinPE environment...
VBScript Code: strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM SoftwareLicensingService",,48) For Each objItem in colItems Wscript.Echo "OEM_DM Bios Key: " & objItem.OA3xOriginalProductKey Next DOS Cmdline Code: @echo off WMIC Path SoftwareLicensingService Get OA3xOriginalProductKey pause>null
These are useful but alas don't work in a WinPE environment... Well, I should say DEFAULT WinPE Environment. I'll have to try adding WinPE-WMI.cab & WinPE-PowerShell.cab to see if it helps...
Just to let you know the latest version of RW-Everything (1.6.7) now works in WinPE. You can use command line options with rw protable. ie: Code: rw.exe /command=msdm.rw /logfile=MSDM.txt where msdm.rw contains: Code: >ACPI Dump MSDM >RwExit All my tools in WinPE are in the X:\Tools folder. So just to display the key, you could have the following in a batch file: Code: @echo off cd X:\Tools\RWPortable%PROCESSOR_ARCHITECTURE% rw.exe /command=msdm.rw /logfile=X:\Tools\MSDM.txt for /f "skip=24 tokens=1-2" %%a in (X:\Tools\MSDM.txt) do ( echo OEM-DM Key^: %%b ) cd X:\Tools If there is no MSDM table then OEM-DM Key is blank.