VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 123[4] ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 00:00:10 03/18/06 Sat
Author: Windows
Subject: Card


Microsoft.com Home | Site Map


Search Microsoft.com for:




Help and Support Home | Select a Product | Search Knowledge Base

Article Translations
ArabicBrazilianBulgarianCroatianCzechDutchEstonianFrenchGermanGreekHebrewHungarianItalianJapaneseKoreanPolishPortugueseRomaniaRussianSimplified ChineseSlovakiaSlovenianSpanishSwedishTraditional ChineseTurkishUkraine

Related Support Centers
• Windows XP



Other Support Options
• Contact Microsoft
Phone Numbers, Support Options and Pricing, Online Help, and more.

• Customer Service
For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.

• Newsgroups
Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.



Page Tools
Print this page

E-mail this page

Microsoft Worldwide

Save to My Support Favorites

Go to My Support Favorites

Send Feedback




How to change the Volume Licensing product key on a Windows XP SP1-based computer
View products that this article applies to.
Article ID : 328874
Last Review : August 25, 2005
Revision : 4.0
This article was previously published under Q328874
On This Page
INTRODUCTION
MORE INFORMATION
Use the Activation Wizard
Use a script
ChangeVLKeySP1.vbs
ChangeVLKey2600.vbs
Example
APPLIES TO

INTRODUCTION
If you use a "leaked" product key (a product key that is known to be available to the general public) for the deployment of Microsoft Windows XP across multiple computers (a Volume Licensing installation), you may not be able to install Windows XP Service Pack 1 (SP1) or automatically obtain updates from the Windows Update Web site. For example, you may experience the symptoms that are described in the following Microsoft Knowledge Base article when you install Windows XP SP1:
326904 (http://support.microsoft.com/kb/326904/) Error message: The product key used to install Windows is invalid
This article describes how to change the Windows XP product key after a Volume Licensing installation. You can use the Windows Activation Wizard graphical user interface (GUI) or a Windows Management Instrumentation (WMI) script. The Activation Wizard method is easier, but if you must change the product key for multiple computers, the script method is better.




Back to the top

MORE INFORMATION
Use the Activation Wizard
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

If you have only a few volume licensing product keys to change, you can use the Activation Wizard.

Note Microsoft recommends that you run System Restore to create a new restore point before you follow these steps. For information about how to create a restore point by using System Restore, see the "To Create a Restore Point" help topic in Help and Support. 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 SP1 for Windows XP.

If you cannot restart Windows after you install SP1, press F8 when you restart the computer, select Last Known Good Configuration, and then repeat this procedure.

Back to the top

Use a script
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, in its five-part alphanumeric form, as a single argument. Microsoft recommends that you use the ChangeVLKey2600.vbs script on Windows XP-based computers that are not running SP1 and that you use the ChangeVLKeySP1.vbs script on Windows XP-based computers that are running SP1. These scripts perform the following functions: • They remove the hyphen characters (-) from the five-part alphanumeric product key.
• They create an instance of the win32_WindowsProductActivation class.
• They call the SetProductKey method with the new volume licensing product key.
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, and either deploy it as part of a startup script or run it from the command line to change the product key on a single computer.

For more information about how to script the product key, visit the following Microsoft Web site:
http://www.microsoft.com/technet/prodtechnol/winxppro/deploy/wpadepl.mspx (http://www.microsoft.com/technet/prodtechnol/winxppro/deploy/wpadepl.mspx)



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

Example
The following example shows how to use the ChangeVLKeySP1.vbs script from a command line: 1. Click Start, and then click Run.
2. 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

Back to the top


--------------------------------------------------------------------------------

APPLIES TO
• Microsoft Windows XP Professional

Back to the top

Keywords: kbhowto kbregistry kbenv kbsetup kbpubtypekc kbmsccsearch KB328874

Back to the top


Did this content help you?
Yes
No
Maybe
Please select one option based on your first choice:
I'm very satisfied
I think it will help, but I haven't tried it yet
It is helpful, but I need more information
It is helpful, but hard to understand
Seemed relevant in search results, but didn't help me
The information is wrong
The page contains one or more broken links
Suggest new content or let us know how we can improve this content (optional):





Thank you for your comments.


Manage Your Profile |Contact Us
©2006 Microsoft Corporation. All rights reserved. Terms of Use |Trademarks |Privacy Statement

____________________________________________________________

When you activate Windows XP, Microsoft stores the data in the Windows Product Activation database files wpa.dbl and Wpa.bak in the folder %systemroot%\system32. If you change the motherboard or make significant hardware changes, XP will require you to reactivate. But if you plan to reinstall XP on the same hardware, you can back up the activation status and then restore it after you reinstall and avoid the activation process. You can backup the Windows Product Activation database files to diskette. They are very small. A directory listing from my XP Pro workstation:


C:\WINDOWS\system32>dir wp*
Volume in drive C has no label.
Volume Serial Number is 8447-0571

Directory of C:\WINDOWS\system32

10/24/2001  08:28 PM            12,584 wpa.bak
01/14/2002  09:05 AM            12,642 wpa.dbl

After you reinstall XP, to restore the Windows Product Activation database files:
Start XP to Minimal Safe mode
Change directory to the \%systemroot%\system32 folder
Rename the newly created wpa.dbl to wpa.nonactivated and wpa.bak, if it exists, to wpabak.nonactivated.
Copy your backed up wpa.dbl and wpb.bak files to the system32 folder
Reboot
This should work if you want to avoid activating XP after a reinstall or restore on the same or very similar hardware. It will not work if the hardware is significantly different from that in place when the Windows Product Activation database files were created. This is not a hack to avoid activating installations.

____________________________________________________________

3.18 How do I correct a Windows XP installation that has become deactivated?
XP contains a new feature, System Restore, that restores the system to a previous con-figuration point. Should you restore your system to a point before you activated XP on your computer, the OS will forget that you activated it, and you'll need to reactivate XP. If the system restore point is past the 30-day grace period that Microsoft allows for activation, you'll have to activate XP immediately.

The only work around to reactivating your system is to perform the following steps:

Start your Windows installation in Minimal Safe mode.

Move to the \%systemroot%\system32 folder.

Rename WPA.DBL to WPA.NOACT.

Rename WPA.BAK to WPA.DBL.

Reboot your system as normal.

The preceding procedure will work only if you've made no significant hardware changes.

[ Next Thread | Previous Thread | Next Message | Previous Message ]


[ Contact Forum Admin ]


Forum timezone: GMT-8
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.