XP serial number replacements implemented with VBS _VBS

Source: Internet
Author: User
Tags microsoft website
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


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.