我有制造商的 Windows 7 恢复盘,我想用它重新安装操作系统。唯一的问题是它要重新格式化整个磁盘。
有什么方法可以欺骗它,让它认为“整个磁盘”只是我的 Windows 分区?
答案1
备份。
即示例性实施例:
方法一:使用WAIK更改自动设置(就分区而言)。
方法二:查找并安装驱动程序。安装系统。传输激活和序列号。
获取产品密钥.vbs:
On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48)
For Each objItem in colItems
Wscript.Echo "OS : " & objItem.Caption
Wscript.Echo "Serial Number : " & GetKey("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")
Wscript.Echo "Service Pack : " & objItem.CSDVersion
Wscript.Echo "Version : " & objItem.Version
Wscript.Echo "windir : " & objItem.WindowsDirectory
Next
Function GetKey(sReg)
Set wshshell = CreateObject("WScript.Shell")
GetKey = ConvertToKey(wshshell.RegRead(sReg))
Set wshshell = Nothing
End Function
Function ConvertToKey(key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
Cur = key(x + KeyOffset) + Cur
key(x + KeyOffset) = (Cur \ 24) And 255
Cur = Cur Mod 24
x = x - 1
Loop While x >= 0
i = i - 1
KeyOutput = Mid(Chars, Cur + 1, 1) & KeyOutput
If (((29 - i) Mod 6) = 0) And (i <> -1) Then
i = i - 1
KeyOutput = "-" & KeyOutput
End If
Loop While i >= 0
ConvertToKey = KeyOutput
End Function
命令行:
cscript //nologo GetProductKey.vbs
保存序列号!
保存激活信息文件:
"%windir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms"
"%windir%\SysWOW64\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms"
"%windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat"
无需密钥即可安装 Windows 7。
安装后:
停止软件保护服务:
net stop sppsvc
恢复激活信息文件。
恢复序列号:
slmgr.vbs -ipk {save serial number}
启动软件保护服务:
net start sppsvc
检查激活状态,命令:
slmgr.vbs -dlv
slmgr.vbs -dli
slmgr.vbs -ato