Advertisement
Guest User

Untitled

a guest
Oct 29th, 2013
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. '***************************************************************************
  2. '
  3. ' Windows XP Key Changer v1.0
  4. ' This script can change the product key on Windows XP SP1, SP2 and SP3
  5. '
  6. '***************************************************************************
  7.  
  8. ON ERROR RESUME NEXT
  9.  
  10. Dim VOL_PROD_KEY
  11. if Wscript.arguments.count<1 then
  12. VOL_PROD_KEY = InputBox ("This script will change the product key of:"&vbCr&"Windows XP SP1, SP2 and SP3."&vbCr&vbCr&"Please input the correct CD-Key in the blank field below:","Windows XP Key Changer")
  13. if VOL_PROD_KEY = "" then
  14. Wscript.quit
  15. end if
  16. else
  17. VOL_PROD_KEY = Wscript.arguments.Item(0)
  18. end if
  19.  
  20. VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any
  21.  
  22. for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")
  23.  
  24. result = Obj.SetProductKey (VOL_PROD_KEY)
  25.  
  26. if err = 0 then
  27. Wscript.echo "Windows XP Product Key was changed successfuly."
  28. end if
  29.  
  30. if err <> 0 then
  31. Wscript.echo "Error entering new product key: "&VOL_PROD_KEY&""&vbCr&vbCr&"Please verify that this Product Key was entered correctly or is a valid key."
  32. Err.Clear
  33. end if
  34.  
  35. Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement