'
' WMI Script - ChangeVLKey.vbs
'
' This script changes the product key on the computer (XP SP1 SP2 2003)
'
' Made by ythggyth.
'***************************************************************************
ON ERROR RESUME NEXT
Dim VOL_PROD_KEY
if Wscript.arguments.count<1 then
VOL_PROD_KEY=InputBox("说明:"&vbCr&vbCr&"此程序用于修改当前Windows系统序列号"&vbCr&vbCr&"将正版序列输入到下面空白处"&vbCr&vbCr&"单击“确定”替换!"&vbCr&vbCr&"hinomoto QQ:284043592"&vbCr&vbCr&"http://hinomoto.myrice.com","序列号替换工具",""
if VOL_PROD_KEY="" then
Wscript.quit
end if
else
VOL_PROD_KEY = Wscript.arguments.Item(0)
end if
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 "修改成功."
end if
if err <> 0 then
Wscript.echo "修改失败."
Err.Clear
end if