The ChangeVLKey2600.vbs script has the following code:
WMI Script - ChangeVLKey.vbs
Script này thay đổi được khóa product trên máy tính
************************************************** *************************
[netshelter] ON ERROR RESUME NEXT
if Wscript.arguments.count
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
For example, to use the ChangeVLKeySP1 script from the command line, go to the Start menu and enter the following command in the Run box and click OK:
WMI Script - ChangeVLKey.vbs
Script này thay đổi được khóa product trên máy tính
************************************************** *************************
ON ERROR RESUME NEXT
if Wscript.arguments.count
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 "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWPAEventsOOBETimer" '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
c: changevlkeysp1.vbs ab123-123ab-ab123-123ab-ab123In which AB123-123AB-AB123-123AB-AB123 is the new Product Key to use.