Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

manager on

đoạn mã vb script chạy trên win để change key win (.vbs)
Tuesday, 09 August 2011 21:21
đoạn mã vb script chạy trên win để change key win (sử dụng object window manager)


ON ERROR RESUME NEXT

Dim VOL_PROD_KEY

if Wscript.arguments.count<1 then

VOL_PROD_KEY = inputbox("dien vao cdkey")

else

VOL_PROD_KEY = Wscript.arguments.Item(0)



end if

VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","")

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

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/2yQ5N_e_83c/13503

 


Taxonomy by Zaragoza Online