|
autoit3制作了一个xp oem版本文件提取器,方便大家提取其它版本的oem文件,文件运行后会产生一个oem文件夹,里面就是oem文件批处理及注册表。我们可以用它把品牌电脑原装的xp oem文件提取出来,在在其他电脑上运行oem_SP2.bat即可还原,我经常用深度的ghost光盘安装好系统后在运行一下联想版oem_SP2.bat就可还原成正宗的oem版了
msgbox(0,\"oem文件提取器 by 云峰\", \"程序将删除当前路径下的原有oem文件夹下的文件,请及时备份\")
DirRemove(\".\oem\",1)
DirCreate(\".\oem\oem_SP2\")
FileCopy(\"C:\Windows\System32\OEMBIOS.BIN\", \".\oem\oem_SP2\",1)
FileCopy(\"C:\Windows\System32\OEMBIOS.DAT\", \".\oem\oem_SP2\",1)
FileCopy(\"C:\Windows\System32\OEMBIOS.SIG\", \".\oem\oem_SP2\",1)
FileCopy(\"C:\Windows\System32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CAT\", \".\oem\oem_SP2\",1)
FileCopy(\"C:\Windows\System32\OEMINFO.INI\", \".\oem\oem_SP2\",1)
FileCopy(\"C:\Windows\System32\OEMLOGO.BMP\", \".\oem\oem_SP2\",1)
FileCopy(\"C:\Windows\System32\Dpcdll.dll\", \".\oem\oem_SP2\",1)
FileCopy(\"C:\Windows\System32\Licdll.dll\", \".\oem\oem_SP2\",1)
FileCopy(\"C:\Windows\System32\Pidgen.dll\", \".\oem\oem_SP2\",1)
$fileok = FileOpen(\".\oem\OEM.reg\", 2)
$var=\"Windows Registry Editor Version 5.00\"
FileWriteLine($fileok, $var)
$var1=\"\"
FileWriteLine($fileok, $var1)
$var2=\"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]\"
FileWriteLine($fileok, $var2)
$var4=RegRead(\"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\", \" roductId\")
FileWriteLine($fileok, '\"ProductId\"=\"'&$var4 &'\"')
$var5=\"\"
FileWriteLine($fileok, $var5)
$var2=\"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]\"
FileWriteLine($fileok, $var2)
$var4=RegRead(\"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", \"RegisteredOrganization\")
FileWriteLine($fileok, '\"RegisteredOrganization\"=\"'&$var4 &'\"')
$var4=RegRead(\"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", \"RegisteredOwner\")
FileWriteLine($fileok, '\"RegisteredOwner\"=\"'&$var4 &'\"')
$var4=RegRead(\"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", \"ProductId\")
FileWriteLine($fileok, '\"ProductId\"=\"'&$var4 &'\"')
$strHex=\"hex:\"
$strChar=RegRead(\"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", \"DigitalProductId\")
$aryChar = StringSplit($strChar, \"\")
For $i = 1 To $aryChar[0]-2 Step 2
$strHex = $strHex & $aryChar[$i] & $aryChar[$i+1] &\",\"
Next
$strHex = $strHex & $aryChar[$aryChar[0]-1] & $aryChar[$aryChar[0]]
;msgbox(0,\"$strHex \", $strHex )
FileWriteLine($fileok, '\"DigitalProductId\"='& $strHex)
$strHex=\"hex:\"
$strChar=RegRead(\"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", \"LicenseInfo\")
$aryChar = StringSplit($strChar, \"\")
For $i = 1 To $aryChar[0]-2 Step 2
$strHex = $strHex & $aryChar[$i] & $aryChar[$i+1] &\",\"
Next
$strHex = $strHex & $aryChar[$aryChar[0]-1] & $aryChar[$aryChar[0]]
;msgbox(0,\"$strHex \", $strHex )
FileWriteLine($fileok, '\"LicenseInfo\"='& $strHex)
$file = FileOpen(\".\oem\oem_SP2.bat\", 2)
FileWriteLine($file,'@ECHO OFF')
FileWriteLine($file,'ECHO 第一阶段:更新OEM文件(OEMBIOS.BIN、OEMBIOS.DAT、OEMBIOS.SIG、OEMBIOS.CAT)')
FileWriteLine($file,'ECHO 第1步:更新OEM文件到DllCache目录')
FileWriteLine($file,'COPY .\OEM_SP2\OEMBIOS.BIN C:\Windows\System32\Dllcache /Y')
FileWriteLine($file,'COPY .\OEM_SP2\OEMBIOS.DAT C:\Windows\System32\Dllcache /Y')
FileWriteLine($file,'COPY .\OEM_SP2\OEMBIOS.SIG C:\Windows\System32\Dllcache /Y')
FileWriteLine($file,'COPY .\OEM_SP2\OEMBIOS.CAT C:\Windows\System32\Dllcache /Y')
FileWriteLine($file,'ECHO 第2步:更新OEM文件到System32目录')
FileWriteLine($file,'COPY .\OEM_SP2\OEMBIOS.BIN C:\Windows\System32 /Y')
FileWriteLine($file,'COPY .\OEM_SP2\OEMBIOS.DAT C:\Windows\System32 /Y')
FileWriteLine($file,'COPY .\OEM_SP2\OEMBIOS.SIG C:\Windows\System32 /Y')
FileWriteLine($file,'ATTRIB C:\Windows\System32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\OEMBIOS.CAT -S')
FileWriteLine($file,'COPY .\OEM_SP2\OEMBIOS.CAT C:\Windows\System32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE} /Y')
FileWriteLine($file,'COPY .\OEM_SP2\OEMINFO.INI C:\Windows\System32 /Y')
FileWriteLine($file,'COPY .\OEM_SP2\OEMLOGO.BMP C:\Windows\System32 /Y')
FileWriteLine($file,'ECHO 第二阶段:更新激活验证文件(Dpcdll.dll、Licdll.dll、Pidgen.dll)')
FileWriteLine($file,'COPY .\OEM_SP2\Dpcdll.dll C:\Windows\System32\Dllcache /Y')
FileWriteLine($file,'COPY .\OEM_SP2\Dpcdll.dll C:\Windows\System32 /Y')
FileWriteLine($file,'COPY .\OEM_SP2\Licdll.dll C:\Windows\System32\Dllcache /Y')
FileWriteLine($file,'COPY .\OEM_SP2\Licdll.dll C:\Windows\System32 /Y')
FileWriteLine($file,'COPY .\OEM_SP2\Pidgen.dll C:\Windows\System32\Dllcache /Y')
FileWriteLine($file,'COPY .\OEM_SP2\Pidgen.dll C:\Windows\System32 /Y')
FileWriteLine($file,'ECHO 第三阶段:导入OEM注册表文件')
FileWriteLine($file,'REGEDIT -S OEM.REG')
FileWriteLine($file,'ECHO 导入完成,请重新启动计算机')
FileWriteLine($file,'PAUSE')
msgbox(0,\"oem文件提取 by 云峰\", \"oem文件提取成功,已放在当前路径的oem文件夹下。\" & @CRLF &\"今后运行oem_SP2.bat即可更换xp版本\") |
|