- 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.
- 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
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.
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:The following example shows how to use the ChangeVLKeySP1.vbs script from a command line:
Reference : microsoft.comSource URL: http://nilushae.blogspot.com/2009/08/change-windows-key-with-script.html
Visit All Fashion Artist for Daily Updated Hairstyles Collection
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.
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:
Examples
For more information about how to script the product key, visit the following Microsoft Web site:ChangeVLKeySP1.vbs
'
' WMI Script - ChangeVLKey.vbs
'
' This script changes the product key on the computer
'
'***************************************************************************
ON ERROR RESUME NEXT
if Wscript.arguments.count<1 vol_prod_key =" Wscript.arguments.Item(0)" vol_prod_key =" Replace(VOL_PROD_KEY," impersonationlevel="impersonate}" result =" Obj.SetProductKey"> 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 vol_prod_key =" Wscript.arguments.Item(0)" vol_prod_key =" Replace(VOL_PROD_KEY," wshshell =" WScript.CreateObject(" impersonationlevel="impersonate}" result =" Obj.SetProductKey"> 0 then
WScript.Echo Err.Description, "0x" & Hex(Err.Number)
Err.Clear
end if
Next
Reference : microsoft.comSource URL: http://nilushae.blogspot.com/2009/08/change-windows-key-with-script.html
Visit All Fashion Artist for Daily Updated Hairstyles Collection
No comments:
Post a Comment