Clé produit Windows XP

De WindowsLinux.net - Astuces pour Windows et Linux !.

Sommaire

Comment changer la clé produit de Windows XP Pro

La clé de Windows XP SP1 ou supérieur peut être changée par une clé "volume licensing".

Attention ! Cet article fonctionne uniquement si vous avez une clé "volume licensing" (ex : pour les entreprises).

Si vous avez un windows OEM ou retail, ceci ne fonctionnera pas.


Il y a deux techniques pour changer le numéro de série - Attention ! Faites des sauvegardes - :

Si vous avez peu d'ordinateurs : utiliser l'assistant d'activation

1. Click Start, and then click Run.

2. In the Open box, type regedit, and then click OK.

3. In the left pane, locate and then click the following registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents

4. In the right pane, right-click OOBETimer, and then click Modify.

5. Change at least one digit of this value to deactivate Windows.

6. Click Start, and then click Run.

7. In the Open box, type the following command, and then click OK. %systemroot%\system32\oobe\msoobe.exe /a

8. Click Yes, I want to telephone a customer service representative to activate Windows, and then click Next.

9. Click Change Product key.

10. Type the new product key in the New key boxes, and then click Update.

If you are returned to the previous window, click Remind me later, and then restart the computer.

11. Repeat steps 6 and 7 to verify that Windows is activated. You receive the following message: Windows is already activated. Click OK to exit.

12. Click OK.

13. Install Windows XP SP1 or a later version of Windows XP.


Si vous avez un parc informatique conséquent : script ".vbs"

Enregistrer le fichier .vbs sur C: en fonction de votre Windows XP.

ChangeVLKeySP1.vbs pour Windows XP comprenant SP1 et supérieur (ex: SP2).

ChangeVLKey2600.vbs pour Windows XP inférieur au SP1 non appliqué.

Il faut ensuite utiliser le script vbs (à l'aidre d'un fichier .bat par exemple).


ChangeVLKeySP1.vbs

' 
' 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

ChangeVLKey2600.vbs

' 
' 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

Utilisation des scripts .vbs

Les exemples suivants montrent comment utiliser le fichier ChangeVLKeySP1.vbs depuis la ligne de commande :


1. Démarrer. Exécuter.

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

Cliquez OK.

Bien sûr, ab123-123ab-ab123-123ab-ab123 est votre numéro de série.

Sources

Informations tirées de :

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q328874

Outils personnels