Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Get Product Key from my Recovery partition


09 Jul 2012   #11

MS Windows 7 Ultimate SP1 64-bit
 
 

here's an example, not of the whose scenario, but this shows you how to read your own Product Key:

Script:
# ************************************************************
# Get Product License Key
# Source is PowerShell.com > PowerTips > Getttin Windows Product Key
# For those interested in learning PowerShell this is an excellent site.
# See their 'Mastering PowerShell' for a thorough presentation of xx chapters
# ************************************************************

# ************************************************************
# Start copying with next uncommented line (no # in first character;
# Copy thru 2nd EXIT;
#  Paste into PowerShell using right-click
# ************************************************************
function Get-ProductKey {    
    
$map="BCDFGHJKMPQRTVWXY2346789" 
    
$value = (get-itemproperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").digitalproductid[0x34..0x42]  
    
$ProductKey ""  
    
for ($i 24$i -ge 0$i--) { 
      
$r 
      
for ($j 14$j -ge 0$j--) { 
        
$r = ($r 256) -bxor $value[$j
        
$value[$j] = [math]::Floor([double]($r/24)) 
        
$r $r 24 
      

      
$ProductKey $map[$r] + $ProductKey 
      
if (($i 5) -eq 0 -and $i -ne 0) { 
        
$ProductKey "-" $ProductKey 
      

    } 
    
$ProductKey


Get-ProductKey $env:userprofile\Desktop\ProductKey.TXT


EXIT
EXIT

# ************************************************************
# Places ProductKey.TXT on your DESKTOP
#
# **********************INSTRUCTIONS**************************
# STEP 1 *****************************************************
# RUN PowerShell as administrator
# START ORB | type POWERSHELL | CTRL+SHIFT+ENTER key combo | ALT+Y keycombo
# ************************************************************
# STEP 2 *****************************************************
# COPY, using CTRL+C, every line down thru both EXIT statements 
# PASTE into Powershell == Right-Click at the PowerShell Prompt
#  (Ctrl+V does not work)
# ************************************************************
# ***************** NOTE - POWERSHELL VERSION*****************
# if you receive this error msg:
#  Get-WinEvent: The system can not find the path specified
# you need to update your PowerShell
# you must be using Powershell 2.0 or later.
#
# To determine your Powershell version:
#   Run PowerShell
#   enter $host.version
#   you should see at least:
# Major  Minor  Build  Revision
# -----  -----  -----  --------
# 2      0      -1     -1
#
# If you do not see the above, update your Vista/Win 7.
# ************************************************************
# *************** NOTE - EXECUTION POLICY*********************
# If you haven't set the execution policy, you may need to:
#   Run PowerShell
#   enter Set-ExecutionPolicy -executionpolicy remotesigned
#
# ************************************************************ 


My System SpecsSystem Spec
.

09 Jul 2012   #12

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Here you go Greg: ProduKey - Recover lost product key (CD-Key) of Windows/MS-Office/SQL Server

run produkey.exe - click File>Source
My System SpecsSystem Spec
09 Jul 2012   #13

MS Windows 7 Ultimate SP1 64-bit
 
 

The last time I checked that Office portion thereof did not work on Office 2010. The win 7 product key part does.
Uses, but more elegantly, the same algorithm as in the Powershell script.
My System SpecsSystem Spec
.


09 Jul 2012   #14

MS Windows 7 Ultimate SP1 64-bit
 
 

From the NirSoft site:
Quote:
ProduKey is a small utility that displays the ProductID and the CD-Key of Microsoft Office (Microsoft Office 2003, Microsoft Office 2007), Windows (Including Windows 7 and Windows Vista), Exchange Server, and SQL Server installed on your computer.
Trouble is that MS changed the algorithm for Office 2010.

Works fine for Win 7.
My System SpecsSystem Spec
10 Jul 2012   #15

Windows 7 Ultimate
 
 

Thanks for the replies, could you please tell me that how can I run Product key.exe, actually I cannot login into my laptop.
My System SpecsSystem Spec
10 Jul 2012   #16

MS Windows 7 Ultimate SP1 64-bit
 
 

You notice that I said that you would need to run on another computer. You need to import the appropriate hive, alter the script to refer to the altered hive.

Researching how to accomplish these steps I leave as an exercise to you.

Have fun,
karl
My System SpecsSystem Spec
10 Jul 2012   #17

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

If you recovery program applies a .wim as they usually do - you can't get the key directly from that .wim file.

You could try marking the recovery partition ACTIVE - use this free boot cd http://www.partitionwizard.com/parti...otable-cd.html

You might boot straight into the recovery program.

If that doesn't work, you might be able to apply the wim manually, but you would need to create boot media to do that - and it would take weeks to show you how.


Then the best thing for you is to order the recovery discs from your manufacturer - they don't usually charge for them - perhaps just postage costs.
My System SpecsSystem Spec
10 Jul 2012   #18

Windows 7 Home Premium 32 bit
 
 

Quote   Quote: Originally Posted by SIW2 View Post
Quote:
The key is heavily encrypted and cannot be read without the OS being booted.
It can, Greg if it is an installed o/s - even if not booted......
Hmmmm..........even if it gets the key, it will be useless if the OP does not get the OEM certificate file *.xrm-ms.

And sadly, Seven Forums does not approve this method of restoring the OEM activation with the OEM key and certificate even if the OP can extract the OEM certificate from his own machine. I can only feel sorry for the OP and for all those who may find themselves in such a pitiable situation.
My System SpecsSystem Spec
10 Jul 2012   #19

Windows 7 Ultimate
 
 

hmmm. I really feel very confused.
My System SpecsSystem Spec
10 Jul 2012   #20
Microsoft MVP

Windows 8.1 Pro with Media Center 64 bit
 
 

Quote   Quote: Originally Posted by muzokh View Post
hmmm. I really feel very confused.
Preinstalled OEM versions of Windows activate against a SLIC table in the BIOS of the PC. There is a matching certificate file that Microsoft gives the OEM's. Basically, even if you can get the original product code it's useless without the matching certificate file. That product code is blocked from online activation. You're barking up the wrong tree. To do what you intend with a regular OEM media you need to use the Product code on the COA sticker and activate over the phone.
My System SpecsSystem Spec
Reply

 Get Product Key from my Recovery partition




Thread Tools



Similar help and support threads for2: Get Product Key from my Recovery partition
Thread Forum
Solved Recovery doesn't detect my recovery partition Software
Solved Hard Drive Partition Without Effecting Recovery Partition Performance & Maintenance
HP Recovery Manager says that my recovery partition has been removed Installation & Setup
Solved Recovery of Product Licence Keys Software
System Image Recovery, Win PE, Recovery Partition Backup and Restore
Change recovery partition into logical partition??? Backup and Restore

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 01:30 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33