Home

Knowledge Base

Forums

Site Info

עברית

Quick Links

Knowledge Base

Active Directory

Cisco and Routing

Exchange Server

Virtualization

Windows Server
2008

Windows 7

Windows Vista

Computer Training

What's New?

Most Popular Articles

PST
Repair for Outlook

Forgot
the Administrator's Password?

Excel
Password Recovery

How to
Write ISO Files

How
to Change the Serial in Windows XP

Install
Windows XP Pro

Disable
UAC in Windows Vista

Install
Active Directory on Windows 2003

Recover a Word
Password

Home Network
Setup

How to
Setup a VLAN on a Cisco Switch

Stay Connected

Join our newsletter

Our biweekly emails will keep you up to date on our latest news and
articles straight to your inbox!
E-mail Address:

Privacy Policy

Follow on
Twitter

Subscribe via
Rss

Author
is a Microsoft Windows Server System - Exchange Server MVP

How can I change the volume licensing product key on a Windows XP SP1-Based
Computer?

by Daniel Petri - January 8, 2009

Computer?

Because of changes in Windows XP Service Pack 1 (SP1), Windows XP-based
computers that use a leaked product key that is known to be available to the
general public may not be able to install SP1 or automatically obtain updates
from the Windows Update Web site. For an easy and quick method of obtaining your
own CD Key please read Quickly
Retrieve Windows CD Key.

For example, you may experience the symptoms that are described in the
following Microsoft Knowledge Base article when you install SP1:

326904 Error Message: The
Product Key Used to Install Windows Is Invalid

There are two (legal) methods that you can use to change the product key with
volume licensing media after installation. You can use either the Windows
Activation Wizard graphical user interface (GUI) or a Windows Management
Instrumentation (WMI) script.

The easier method to use is the Use the Activation Wizard method. Use this
method when you only have a few computers on which to change the product key.
The Use a Script method is best when you have a number of computers on which you
have to change the product key.

Legal Note: Make sure you understand that this method is
indeed legal. This is NO crack, NO hack, there is nothing illegal with this
article. I will not, however, encourage any reader to use an illegally obtained
CD Key. What you do in your own house/office is your own business, and I cannot
and will not be held responsible for your actions.

Method #1: Use the Activation Wizard

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

Warning!

This document contains instructions for editing the registry. If you make any
error while editing the registry, you can potentially cause Windows to fail or
be unable to boot, requiring you to reinstall Windows. Edit the registry at your
own risk. Always back up the registry before making any changes. If you do not
feel comfortable editing the registry, do not attempt these instructions.
Instead, seek the help of a trained computer specialist.

Note: Microsoft recommends that you run System Restore to
create a new restore point before you complete the following steps:

Click Start, and then click Run.

In the Open box, type Regedit, and then click OK.

In the left pane, locate and then click the following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents

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

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

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. If
you are returned to the previous window, click Remind me later, and then
restart the computer.

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

Click OK.

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.

Method #2: 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.

ChangeVLKeySP1.vbs

'
' WMI Script - ChangeVLKey.vbs
'
' This script changes the product key on the computer
'
'***************************************************************************

ON ERROR RESUME NEXT

if Wscript.arguments.count&lt;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 &lt;&gt; 0 then
WScript.Echo Err.Description, "0x" &amp; 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&lt;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 &lt;&gt; 0 then
WScript.Echo Err.Description, "0x" &amp; Hex(Err.Number)
Err.Clear
end if

Next

Example

The following example describes how to use the ChangeVLKeySP1.vbs script from
a command line:

Click Start, and then click Run.

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

Share this
article:

Delicious
Twitter
Reddit
E-mail

About Daniel Petri
Daniel Petri is a
world-known IT professional, technical trainer and creator of one of the world's
largest IT knowledge bases – www.petri.co.il. Daniel consults to leading global
Fortune 1000 companies in Microsoft IT Infrastructure and Engineering
strategies. For his contribution to the IT Pro community Daniel has received the
Microsoft Most Valuable Professional (MVP) award for the 5th time In a row.
Daniel's professional certifications include Microsoft Certified Technology
Specialist, Microsoft Certified Systems Engineer, Microsoft Certified System
Administrator and Microsoft Certified Trainer. In his spare time, Daniel rides a
1340cc 200bhp 2008 model Suzuki Hayabusa sports bike and manages the Israeli
Bikers forum. You can contact Daniel at daniel-at-petri-dot-co-dot-il.

Related Articles

How can I install Windows Vista without supplying the product
key?

Change a Windows XP computer name when the computer cannot
boot

Change
Office XP CD Key

Recover Lost Product Keys for Windows 2000, XP, 2003 - CD-Key
Recovery for Windows 2000, Windows 2003, and Windows XP

Change User Password from a Remote Computer

Get the Windows Experience Index (WEI) score of a Vista Network
Computer

What’s Windows Product Activation?

Add Volume Control in Windows XP

Sign Up For the Petri IT Knowledgebase Weekly
Digest!E-mail Address:

Search Site Sponsored
by
TechNet Plus Direct

Sponsors

Kiwi
Syslog Server
Receives, logs, displays, and forwards syslog messages from network
devices. Grab the FREE download!

Free
Compliance Download Configuresoft provides real
time compliance checking for multiple VMware ESX host servers at
once.

Free
ipMonitor Trial SolarWinds ipMonitor delivers
out-of-the-box, entry-level monitoring that is perfect for keeping up with
your network devices, servers, and
applications.

Terms of Use | Privacy Policy | Contact | Advertise  ©2009 Blue
Whale Web Inc.