• ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
Seize the moment! nominate yourself or a tech enthusiast you admire & join the HP Community Experts!
HP Recommended
HP OMEN 15-dc1019ur
Microsoft Windows 10 (64-bit)

Hello. I tried to install linux on my laptop. And didn't save preinstalled windows 10 licence key. How can i restore it?

1 ACCEPTED SOLUTION

Accepted Solutions
HP Recommended

Hi

sudo cat /sys/firmware/acpi/tables/MSDM | strings | tail -n 1

KeyFinderInstaller may help....
https://www.magicaljellybean.com/keyfinder/

Doing research, and none of the methods are mine, I have some, simple single lines of code that will list the same value for your Windows 10 Product Key…
Two for Windows 10 and one for Linux.

W10 Using cmd.exe as an Administrator (copy and paste accordingly).

wmic path softwarelicensingservice get OA3xOriginalProductKey >> c:\ProdKey.txt

Creates a text file called ProdKey.txt on your C:\ area.

Next is a PowerShell command, as Administrator...
(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey

but it will run within W10 using cmd.exe as an Administrator.
powershell (Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey

Last, but not least....
Linux@Lubuntu:~$ sudo cat /sys/firmware/acpi/tables/MSDM | strings | tail -n 1

https://www.microsoft.com/en-us/software-download/windows10
https://www.microsoft.com/en-us/software-download/windows10ISO   Linux download page.

View solution in original post

1 REPLY 1
HP Recommended

Hi

sudo cat /sys/firmware/acpi/tables/MSDM | strings | tail -n 1

KeyFinderInstaller may help....
https://www.magicaljellybean.com/keyfinder/

Doing research, and none of the methods are mine, I have some, simple single lines of code that will list the same value for your Windows 10 Product Key…
Two for Windows 10 and one for Linux.

W10 Using cmd.exe as an Administrator (copy and paste accordingly).

wmic path softwarelicensingservice get OA3xOriginalProductKey >> c:\ProdKey.txt

Creates a text file called ProdKey.txt on your C:\ area.

Next is a PowerShell command, as Administrator...
(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey

but it will run within W10 using cmd.exe as an Administrator.
powershell (Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey

Last, but not least....
Linux@Lubuntu:~$ sudo cat /sys/firmware/acpi/tables/MSDM | strings | tail -n 1

https://www.microsoft.com/en-us/software-download/windows10
https://www.microsoft.com/en-us/software-download/windows10ISO   Linux download page.

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.