Script for modifying the Windows serial number

Source: Internet
Author: User

'
'Wmi script-changevlkey. vbs
'
'This script changes the product key on the computer (XP SP1 SP2 2003)
'
'Made by zyling.
'*************************************** ************************************
Do
On Error resume next

Dim vol_prod_key
If wscript. Arguments. Count <1 then
Vol_prod_key = inputbox ("usage instructions (OEM version is invalid):" & vbcr & "This script will modify the serial number of the current windows. Use the calculator to calculate the serial number matching the current Windows instance, copy and paste it into the following space. "& Vbcr &" Input Serial Number (XP vlk by default): "," Windows XP/2003 Serial Number replacement tool "," PJVCV-XCPPF-6GTKK-QXRPY-FBKGJ ")
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 "your windows CD-key has been modified successfully. Check System Properties. "
End if

If err <> 0 then
Wscript. Echo "modification failed! Check whether the entered CD-key matches the current Windows version. "
Err. Clear
End if

Next
Loop

Related Article

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.