No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Vous devez être membre et vous identifier pour publier un article.
Les visiteurs peuvent toutefois commenter chaque article par une réponse.

Modifier la clé de Windows XP

Astuces de l’Infobrol (Windows Xp)Article publié le 30/10/2005 07:03:36


Sur le site de Microsoft, on trouve la manière de modifier sois-même la clé entrée lors de l'installation de Windows XP:

changevlkeysp1.vbs
  1. '
  2. ' WMI Script - ChangeVLKey.vbs
  3. '
  4. ' This script changes the product key on the computer
  5. '
  6. '***************************************************************************
  7.  
  8. ON ERROR RESUME NEXT
  9.  
  10.  
  11. if Wscript.arguments.count‹1 then
  12. Wscript.echo "Script can't run without VolumeProductKey argument"
  13. Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX"
  14. Wscript.quit
  15. end if
  16.  
  17. Dim VOL_PROD_KEY
  18. VOL_PROD_KEY = Wscript.arguments.Item(0)
  19. VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any
  20.  
  21. for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")
  22.  
  23. result = Obj.SetProductKey (VOL_PROD_KEY)
  24.  
  25. if err ‹› 0 then
  26. WScript.Echo Err.Description, "0x" & Hex(Err.Number)
  27. Err.Clear
  28. end if
  29.  
  30. Next

On lance le script de cette manière:

c:\changevlkeysp1.vbs ab123-123ab-ab123-123ab-ab123



NB:
c:\changevlkeysp1.vbs représente le chemin vers le script
ab123-123ab-ab123-123ab-ab123 représente la nouvelle clé

  1. '
  2. ' WMI Script - ChangeVLKey.vbs
  3. '
  4. ' This script changes the product key on the computer
  5. '
  6. '***************************************************************************
  7.  
  8. ON ERROR RESUME NEXT
  9.  
  10. if Wscript.arguments.count‹1 then
  11. Wscript.echo "Script can't run without VolumeProductKey argument"
  12. Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX"
  13. Wscript.quit
  14. end if
  15.  
  16. Dim VOL_PROD_KEY
  17. VOL_PROD_KEY = Wscript.arguments.Item(0)
  18. VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any
  19. Dim WshShell
  20. Set WshShell = WScript.CreateObject("WScript.Shell")
  21. WshShell.RegDelete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents\OOBETimer" 'delete OOBETimer registry value
  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 Err.Description, "0x" & Hex(Err.Number)
  28. Err.Clear
  29. end if
  30.  
  31. Next



Avatar :: nohope Un article de nohope

Source : www.microsoft.com


Sélection, tri et recherche d'articles
FILTRER :
TRIER :1er critère : 2e critère :
CHERCHER : Dans les titres Dans le contenu


[Afficher les liens en fonction des critères du formulaire ci-dessus]

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 13/09/2004, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/ast-rf-252.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.