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
ChangeVLKey2600.vbs
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:
|