Copy Code code as follows:
On ERROR RESUME NEXT
Dim Vol_prod_key
If Wscript.arguments.count<1 Then
Vol_prod_key=inputbox ("This program can help you replace the serial number of Windows XP.) The "&vbCr&vbCr&" serial number is searched and entered by yourself. The following list is not necessarily the serial number you are currently using, only for format reference. "&vbCr&vbCr&" Please enter a new serial number: "," Windows XP serial number Changer 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 "Modified successfully. Please click on the accompanying URL to the Microsoft website for verification. Good luck to you! "
End If
If Err <> 0 Then
WScript.Echo "Replace failed! The serial number you entered is incorrect. "
Err.Clear
End If
Next