If the computer still boots, create and run the following VB script to get the current install key to use to reinstall Windows 7.
Open Notepad. Then copy all the data in the Code box below and paste it into Notepad.
Click
File /
Save as and save it as
"ShowKey.vbs" on the Desktop. Include the double quotes or Notepad will add .txt to the end of the name.
Right click on
ShowKey.vbs on the Desktop and select
Run as Administrator.
Output is in a window on the Desktop. Click Yes to save it to
Windows Key.txt in the same folder
Showkeys.vbs is in which in this case should be your Desktop. It would be a good idea to print that file or save it somewhere so when you need it, it's available.
Set WshShell=CreateObject("WScript.Shell")
Key=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
DigitalID=WshShell.RegRead(key & "DigitalProductId")
ProductName=Product Name: " & WshShell.RegRead(Key & "ProductName") & vbNewLine
ProductID=Product ID: " & WshShell.RegRead(Key & "ProductID") & vbNewLine
ProductKey=Installed Key: " & ConvertToKey(DigitalID)
ProductID=ProductName & ProductID & ProductKey
If vbYes=MsgBox(ProductId & vblf & vblf & "Save to a file?", vbYesNo + vbQuestion, "Windows Key Information") then
Save ProductID
End if
Function ConvertToKey(Key)
Const KeyOffset=52
isWin8=(Key(66) \ 6) And 1
Key(66)=(Key(66) And &HF7) Or ((isWin8 And 2) * 4)
i=24
Chars=BCDFGHJKMPQRTVWXY2346789"
Do
Cur=0
X=14
Do
Cur=Cur * 256
Cur=Key(X + KeyOffset) + Cur
Key(X + KeyOffset)=(Cur \ 24)
Cur=Cur Mod 24
X=X -1
Loop While X ]= 0
i=i -1
KeyOutput=Mid(Chars, Cur + 1, 1) & KeyOutput
Last=Cur
Loop While i ]= 0
If (isWin8=1) Then
keypart1=Mid(KeyOutput, 2, Last)
insert=N"
KeyOutput=Replace(KeyOutput, keypart1, keypart1 & insert, 2, 1, 0)
If Last=0 Then KeyOutput=insert & KeyOutput
End If
a=Mid(KeyOutput, 1, 5)
b=Mid(KeyOutput, 6, 5)
c=Mid(KeyOutput, 11, 5)
d=Mid(KeyOutput, 16, 5)
e=Mid(KeyOutput, 21, 5)
ConvertToKey=a & "-" & b & "-" & c & "-" & d & "-" & e
End Function
Function Save(Data)
Const ForWRITING=2
Const asASCII=0
Dim fso, f, fName, ts
fName=Windows Key.txt"
Set fso=CreateObject("Scripting.FileSystemObject")
fso.CreateTextFile fName
Set f=fso.GetFile(fName)
Set f=f.OpenAsTextStream(ForWRITING, asASCII)
f.Writeline Data
f.Close
End Function
Script posted by NiFu here:
How do I find my Product Key?Once you have that, do the following:
If you do not have a Windows 7 installation DVD, or it's not up to the Service Pack level currently installed, you can download a legal copy with SP1 integrated from here:
Windows 7 Direct Download LinksMake sure you get the same version you have, Home Premium, Pro or Ultimate and 32 or 64 bit. Note that Basic or Starter is not available.
I recommend using
ImgBurn at 4X speed (or the slowest available) to create the DVD from the downloaded .iso file. Just be careful during the install not to accidentally install some of the bundled junk that comes with it. Always take The Custom Install option.
You can do this on any computer capable of burning a DVD.YOU MUST HAVE A VALID KEY TO INSTALL THIS .ISO. The one on the COA sticker on your computer will work.
You can also create a bootable USB Flash drive (4GB or larger) to install Windows 7 from.
- Download and run Universal USB Installer – Easy as 1 2 3
- Select Windows 7 from the first drop down list, all the way to the bottom
- Select the downloaded Windows 7 iso file
- Select your USB flash drive
- Click Create
For techies or folks who work on computers:
Create Windows 7 Universal ISO With All Editions Selection On Install with ei.cfg Removal Utility.
This will fit on a 6GB flash drive or can be burned to a DVD.