User Tools

Site Tools


microsoft:desktop:win_xp:change_key

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
microsoft:desktop:win_xp:change_key [2013/11/25 23:44] – external edit 127.0.0.1microsoft:desktop:win_xp:change_key [2016/03/02 10:30] (current) – external edit 127.0.0.1
Line 1: Line 1:
-[[http://support.microsoft.com/kb/328874/en-us]]+===Changing the Volume Licensing product key=== 
 + 
 +[[http://support.microsoft.com/kb/328874/en-us|http://support.microsoft.com/kb/328874/en-us]]
  
 === Deactivate Windows === === Deactivate Windows ===
  
-    Click Start, and then click Run. +<code> 
-    In the Open box, type regedit, and then click OK. +  Click Start, and then click Run. 
-    In the navigation pane, locate and then click the following registry key: +  In the Open box, type regedit, and then click OK. 
-    HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents +  In the navigation pane, locate and then click the following registry key: 
-    In the topic pane, right-click OOBETimer, and then click Modify. +  HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents 
-    Change at least one digit of this value to deactivate Windows.+  In the topic pane, right-click OOBETimer, and then click Modify. 
 +  Change at least one digit of this value to deactivate Windows. 
 +</code>
  
 === Reactivate Windows and add new product key === === Reactivate Windows and add new product key ===
  
 +<code>
 +  Click Start, and then click Run.
 +  In the Open box, type the following command, and then click OK.
 +  %systemroot%\system32\oobe\msoobe.exe /a
 +  Click Yes, I want to telephone a customer service representative to activate Windows, and then click Next.
 +  Click Change Product key.
 +  Type the new product key in the New key boxes, and then click Update.
 +</code>
  
-    Click Start, and then click Run. +<code> 
-    In the Open box, type the following command, and then click OK. +  If you are returned to the previous window, click Remind me later, and then restart the computer. 
-    %systemroot%\system32\oobe\msoobe.exe /a +  Repeat steps 1 and 2 to verify that Windows is activated. You receive the following message: 
-    Click Yes, I want to telephone a customer service representative to activate Windows, and then click Next. +  Windows is already activated. Click OK to exit. 
-    Click Change Product key. +  Click OK. 
-    Type the new product key in the New key boxes, and then click Update. +  Install Windows XP Service Pack 1a or a later version of Windows XP. 
- +</code>
-    If you are returned to the previous window, click Remind me later, and then restart the computer. +
-    Repeat steps 1 and 2 to verify that Windows is activated. You receive the following message: +
-    Windows is already activated. Click OK to exit. +
-    Click OK. +
-    Install Windows XP Service Pack 1a or a later version of Windows XP. +
  
 If you cannot restart Windows after you install Windows XP SP1 or a later version of Windows XP, try the following steps: If you cannot restart Windows after you install Windows XP SP1 or a later version of Windows XP, try the following steps:
  
-    Restart your computer and start pressing F8 until you see the Windows Advanced Options menu. +<code> 
-    Select Last Known Good Configuration from the menu and press ENTER. This option starts Windows by using a previous good configuration. +  Restart your computer and start pressing F8 until you see the Windows Advanced Options menu. 
-    Repeat steps 1 through 8 under "Reactivate Windows and add new product key."+  Select Last Known Good Configuration from the menu and press ENTER. This option starts Windows by using a previous good configuration. 
 +  Repeat steps 1 through 8 under "Reactivate Windows and add new product key." 
 +</code>
  
-If you can install SP1 or a later version of Windows XP and you can restart Windows, you have resolved the issue. If the issue has not been resolved, try method 2 or see the "Next Steps" section for more troubleshooting resources. +If you can install SP1 or a later version of Windows XP and you can restart Windows, you have resolved the issue. If the issue has not been resolved, try method 2 or see the "Next Steps" section for more troubleshooting resources. Method 2: Use a script If you must change the product key for multiple computers, we recommend this method. You can create a WMI script that changes the volume licensing product key, and then deploy this script in a startup script.
-Method 2: Use a script +
-If you must change the product key for multiple computers, we recommend this method. You can create a WMI script that changes the volume licensing product key, and then deploy this script in a startup script.+
  
 The sample ChangeVLKey2600.vbs script and the sample ChangeVLKeySP1 script that are described in this section use the new volume licensing key that you want to enter as a single argument. It is in a five-part alphanumeric form. The sample ChangeVLKey2600.vbs script and the sample ChangeVLKeySP1 script that are described in this section use the new volume licensing key that you want to enter as a single argument. It is in a five-part alphanumeric form.
Line 40: Line 47:
 We recommend that you use the ChangeVLKey2600.vbs script on Windows XP-based computers that are not running Windows XP SP1 and later versions of Windows XP and that you use the ChangeVLKeySP1.vbs script on Windows XP-based computers that are running Windows XP SP1 and later versions of Windows XP. These scripts perform the following functions: We recommend that you use the ChangeVLKey2600.vbs script on Windows XP-based computers that are not running Windows XP SP1 and later versions of Windows XP and that you use the ChangeVLKeySP1.vbs script on Windows XP-based computers that are running Windows XP SP1 and later versions of Windows XP. These scripts perform the following functions:
  
-    They remove the hyphen characters (-) from the five-part alphanumeric product key. +<code> 
-    They create an instance of the win32_WindowsProductActivation class. +  They remove the hyphen characters (-) from the five-part alphanumeric product key. 
-    They call the SetProductKey method with the new volume licensing product key.+  They create an instance of the win32_WindowsProductActivation class. 
 +  They call the SetProductKey method with the new volume licensing product key. 
 +</code>
  
-You can create a batch file or a cmd file that uses either of the following sample scripts, together with the new product key as an argument. You can deploy it as part of a startup script or run it from the command line to change the product key on a single computer. +You can create a batch file or a cmd file that uses either of the following sample scripts, together with the new product key as an argument. You can deploy it as part of a startup script or run it from the command line to change the product key on a single computer. Examples For more information about how to script the product key, visit the following Microsoft Web site: [[http://technet.microsoft.com/en-us/library/bb457096.aspx|http://technet.microsoft.com/en-us/library/bb457096.aspx]]
-Examples +
-For more information about how to script the product key, visit the following Microsoft Web site: +
-http://technet.microsoft.com/en-us/library/bb457096.aspx+
  
 == ChangeVLKeySP1.vbs == == ChangeVLKeySP1.vbs ==
  
 +<code>
 +'
 +' WMI Script - ChangeVLKey.vbs
 +'
 +' This script changes the product key on the computer
 +'
 +'***************************************************************************
  
-  '  +ON ERROR RESUME NEXT 
-  ' WMI Script - ChangeVLKey.vbs + 
-  ' +if Wscript.arguments.count<1 then 
-  ' This script changes the product key on the computer + 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 
-  ON ERROR RESUME NEXT + 
-   +Dim VOL_PROD_KEY 
-   +VOL_PROD_KEY = Wscript.arguments.Item(0) 
-  if Wscript.arguments.count<1 then +VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any 
-   Wscript.echo "Script can't run without VolumeProductKey argument" + 
-   Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX" +for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation"
-   Wscript.quit + 
-  end if + result = Obj.SetProductKey (VOL_PROD_KEY) 
-   + 
-  Dim VOL_PROD_KEY + if err <> 0 then 
-  VOL_PROD_KEY = Wscript.arguments.Item(0) +    WScript.Echo Err.Description, "0x" & Hex(Err.Number) 
-  VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any +    Err.Clear 
-   + end if 
-  for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation"+ 
-   +Next 
-   result = Obj.SetProductKey (VOL_PROD_KEY) +</code>
-   +
-   if err <> 0 then +
-      WScript.Echo Err.Description, "0x" & Hex(Err.Number) +
-      Err.Clear +
-   end if +
-   +
-  Next +
- +
  
 == ChangeVLKey2600.vbs == == ChangeVLKey2600.vbs ==
  
 +<code>
 +'
 +' WMI Script - ChangeVLKey.vbs
 +'
 +' This script changes the product key on the computer
 +'
 +'***************************************************************************
  
-  '  +ON ERROR RESUME NEXT 
-  ' WMI Script - ChangeVLKey.vbs + 
-  ' +if Wscript.arguments.count<1 then 
-  ' This script changes the product key on the computer + 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 
-  ON ERROR RESUME NEXT + 
-   +Dim VOL_PROD_KEY 
-  if Wscript.arguments.count<1 then +VOL_PROD_KEY = Wscript.arguments.Item(0) 
-   Wscript.echo "Script can't run without VolumeProductKey argument" +VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any 
-   Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX" +Dim WshShell 
-   Wscript.quit +Set WshShell = WScript.CreateObject("WScript.Shell"
-  end if +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"
-  Dim VOL_PROD_KEY + 
-  VOL_PROD_KEY = Wscript.arguments.Item(0) + result = Obj.SetProductKey (VOL_PROD_KEY) 
-  VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any + 
-  Dim WshShell + if err <> 0 then 
-  Set WshShell = WScript.CreateObject("WScript.Shell"+    WScript.Echo Err.Description, "0x" & Hex(Err.Number) 
-  WshShell.RegDelete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents\OOBETimer" 'delete OOBETimer registry value +    Err.Clear 
-  for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation"+ end if 
-   + 
-   result = Obj.SetProductKey (VOL_PROD_KEY) +Next 
-   +</code>
-   if err <> 0 then +
-      WScript.Echo Err.Description, "0x" & Hex(Err.Number) +
-      Err.Clear +
-   end if +
-   +
-  Next  +
- +
  
 The following example shows how to use the ChangeVLKeySP1.vbs script from a command line: The following example shows how to use the ChangeVLKeySP1.vbs script from a command line:
  
-    Click Start, and then click Run. +<code> 
-    In the Open box, type the following command, where AB123-123AB-AB123-123AB-AB123 is the new product key that you want to use, and then click OK: +  Click Start, and then click Run. 
-    c:\changevlkeysp1.vbs ab123-123ab-ab123-123ab-ab123+  In the Open box, type the following command, where AB123-123AB-AB123-123AB-AB123 is the new product key that you want to use, and then click OK: 
 +  c:\changevlkeysp1.vbs ab123-123ab-ab123-123ab-ab123 
 +</code> 
 + 
 +For more information about Genuine Microsoft Software, visit the following Microsoft Web site: [[http://www.microsoft.com/genuine/default.aspx|http://www.microsoft.com/genuine/default.aspx]] If you can install SP1 or a later version of Windows XP and you can restart Windows, you have resolved the issue. If the issue has not been resolved, see the "Next Steps" section.
  
-For more information about Genuine Microsoft Software, visit the following Microsoft Web site: 
-http://www.microsoft.com/genuine/default.aspx 
-If you can install SP1 or a later version of Windows XP and you can restart Windows, you have resolved the issue. If the issue has not been resolved, see the "Next Steps" section. 
microsoft/desktop/win_xp/change_key.1385423088.txt.gz · Last modified: 2016/03/02 10:29 (external edit)