ON ERROR RESUME NEXT

Dim VOL_PROD_KEY
if Wscript.arguments.count<1 then
   VOL_PROD_KEY=InputBox("原始碼出處 bbs.51ct.cn"&vbCr&vbCr&"http://iex2005.myweb.hinet.net 中文化"&vbCr&vbCr&"    本程式將自動替換你當前 Windows XP 的序號,通過微軟驗證。"&vbCr&vbCr&" 本程式所附序號為 VLK 版 (OEM 版無效)：","Windows XP 序號更新","DG8FV-B9TKY-FRT9J-6CRCC-XPQ4G")
   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 "跟新失敗!輸入 CD-KEY 與版本不符合。"
      Err.Clear
   end if

Next