quinta-feira, 30 de setembro de 2010

Script para atualizar a licença do Windows XP.

1 - Abra o bloco de notas e cole este script:


'***************** I N I C I O ************************************************
'
' WMI Script - ChangeVLKey.vbs
'
' Este script altera a chave de produto no computador
'
'***************************************************************************

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 THMPV-77D6F-94376-8HGKG-VRDRQ"
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
'**************************** F I M *****************************************


2 - Salve-o com o nome: ChangeVLKey.vbs em C:\

3 - Clique em: iniciar -> Executar.

4 - Digite: ChangeVLKey.vbs THMPV-77D6F-94376-8HGKG-VRDRQ

5 - Espere um pouco e reinicie o windows.

Nenhum comentário: