A VBS script that can replace the serial number of Windows XP or 2003 _vbs

Source: Internet
Author: User
Copy the following code to a text file and save as a VBS file to execute:
Copy Code code as follows:

' For WinXP SP1 SP2, Windows Server 2003
'***************************************************************************

On ERROR RESUME NEXT

Dim Vol_prod_key
If Wscript.arguments.count<1 Then
Vol_prod_key=inputbox (Invalid OEM version): "&vbCr&vbCr&" This script will modify the serial number of the current Windows. Please use the operator to calculate the serial number matching the current Windows, copy and paste into the following space. "&vbCr&vbCr&" Enter serial number (default is XP VLK): "," 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, "-", "")

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. Please check the System properties. "
End If

If Err <> 0 Then
WScript.Echo "Modification failed!" Please check that the cd-key you entered matches the current version of Windows. "
Err.Clear
End If

Next

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.