Dim VOL_PROD_KEY if Wscript.arguments.count1 then VOL_PROD_KEY=InputBox("本程序能幫助您更換 WindowsXP 的序列號。"vbCrvbCr"序列號由您自己尋找并輸入。下面列出的不一定是您當前用的序列號,僅作格式參考。"vbCrvbCr"請輸入新的序列號:","WindowsXP序列號更換器 by donghai","MRX3F-47B9T-2487J-KWKMF-RPWBY") 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 "修改成功。請點擊附帶的網(wǎng)址到微軟網(wǎng)站進行驗證。祝您好運!" end if
if err > 0 then Wscript.echo "替換失??!您輸入的序列號有誤。" Err.Clear end if