当前位置:首页>>软件教程>>操作系统>>新闻内容  
更改Windows XP序列号
作者:smallfrogs 发布时间:2003-10-5 22:10:22 | 【字体:
===============================================
本文适用于:
Microsoft Windows XP Professional
Microsoft Windows XP Professional SP1
===============================================

本文是用于描述如何更改Windows XP中的序列号,你有2个方法来修改在已经安装完毕的Windows XP上更改序列号,一个是使用GUI界面里面的激活向导,一个是使用WMI(Windows Management Instrumentation)来实现的。

使用激活向导修改

微软强烈建议你在修改之前作一个系统还原点,以免遭受不测。

1.点击[开始],再点击[运行];
2.输入regedit以后回车打开注册表编辑器;
3.定位到HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents,在右边右键单击OOBETimer,然后选择修改;
4.至少修改一个字节,确定保存。
5.点击[开始],再点击[运行];
6.输入%systemroot%\system32\oobe\msoobe.exe /a
7.选择通过电话激活以后点击下一步;
8.点击修改序列号;
9.输入新的序列号以后选择更新;
如果退回到前一个画面,那么选择稍后激活,并重新启动;
10.反复5---8步一直到修改成功为止;
11.重新激活。
12.点击确定。
13.安装SP1。
如果你安装SP1以后不能重新启动,那么启动的时候按F8,选择使用[最后一次正确的配置],然后重复以上流程。


使用脚本

以下有2个脚本,一个是用于没有安装SP1的WinXP,一个是用于已经安装了SP1的WinXP。

下面是用于已经安装了SP1的WinXP的脚本(ChangeVLKeySp1.vbs),使用方法同没有安装SP1的WinXP的脚本,一起放在本文的最后一段里面(例子)。

'
' WMI Script - ChangeVLKeySp1.vbs
'
' Windows XP With SP1
'
' This script changes the product key on the computer
'
'***************************************************************************

ON ERROR RESUME NEXT


if Wscript.arguments.count<1 then
Wscript.echo "Script can't run without VolumeProductKey argument"
Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX"
Wscript.quit
end if

Dim VOL_PROD_KEY
VOL_PROD_KEY = Wscript.arguments.Item(0)
VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any

for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")

result = Obj.SetProductKey (VOL_PROD_KEY)

if err <> 0 then
WScript.Echo Err.Description, "0x" & Hex(Err.Number)
Err.Clear
end if

Next

下面的脚本是用于没有安装SP1的WinXP(ChangeVLKey2600.vbs)。

'
' WMI Script - ChangeVLKey2600.vbs
'
' This script changes the product key on the computer
'
'***************************************************************************

ON ERROR RESUME NEXT

if Wscript.arguments.count<1 then
Wscript.echo "Script can't run without VolumeProductKey argument"
Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX"
Wscript.quit
end if

Dim VOL_PROD_KEY
VOL_PROD_KEY = Wscript.arguments.Item(0)
VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegDelete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents\OOBETimer" 'delete OOBETimer registry value
for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")

result = Obj.SetProductKey (VOL_PROD_KEY)

if err <> 0 then
WScript.Echo Err.Description, "0x" & Hex(Err.Number)
Err.Clear
end if

Next


例子:脚本使用方法

以下的例子描述了在命令行里面如何使用VBS脚本程序。

1.点击[开始],然后点击[运行];
2.输入C:\ChangeVLKeySp1.vbs ABCDE-ABCDE-ABCDE-ABCDE-ABCDE-ABCDE
          假设 ChangeVLKeySp1.vbs 放在C:根目录下
          ABCDE-ABCDE-ABCDE-ABCDE-ABCDE-ABCDE 是新的序列号
          以上 ChangeVLKeySp1.vbs 适用于已经安装了SP1的WinXP,没有安装SP1的 ChangeVLKey2600.vbs 的使用方法同样是这样的。
3.然后点击[确定]即可。


文章来源:smallfrogs
·WinXP无法安装工行U盾的解决方法
·解决鼠标右键“新建”记事本丢失
·Windows XP SP3下Internet Explorer桌面图标丢失的解决方法
·WinXP下提高双硬盘传输速度的技巧
·U盘启动PE安装Windows XP的成功经验
·调整WinXP参数加快WinXP运行速度
·Windows XP回收站无法清空解决办法
·设置Windows XP中英文语言的详细方法
·不卸载 直接安装Windows XP SP3的方法
·不用光盘WinXP也能自动修复受损的文件