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
Article publié le 30/10/2005 07:03:36Sur 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
Code VisualBASIC ou VBA ou VBS (30 lignes)
' ' WMI Script - ChangeVLKey.vbs ' ' This script changes the product key on the computer ' '*************************************************************************** ON ERROR RESUME NEXT if Wscript.arguments.count‹1 then Wscript.echo "Script can't run without VolumeProductKey argument" Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX" Wscript.quit end if Dim VOL_PROD_KEY VOL_PROD_KEY = Wscript.arguments.Item(0) 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 Err.Description, "0x" & Hex(Err.Number) Err.Clear end if 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é
Code VisualBASIC ou VBA ou VBS (31 lignes)
' ' WMI Script - ChangeVLKey.vbs ' ' This script changes the product key on the computer ' '*************************************************************************** ON ERROR RESUME NEXT if Wscript.arguments.count‹1 then Wscript.echo "Script can't run without VolumeProductKey argument" Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX" Wscript.quit end if Dim VOL_PROD_KEY VOL_PROD_KEY = Wscript.arguments.Item(0) VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any Dim WshShell Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.RegDelete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents\OOBETimer" 'delete OOBETimer registry value for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation") result = Obj.SetProductKey (VOL_PROD_KEY) if err ‹› 0 then WScript.Echo Err.Description, "0x" & Hex(Err.Number) Err.Clear end if Next
Un article de nohope
Source : www.microsoft.com
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.