
Bazen bir Programi .vbs ile sonlandirmamiz gerekebilir , ki genellikle küçük capli programciklar yapiyorsaniz bunun bazi durumlarda kacinilmaz olduğu bir gercektir , herneyse bu gibi durumlarda
Option Explicit
Dim objWMIService, objProcess, colProcess
Dim strComputer, strProcessKill
strComputer = "."
strProcessKill = "'msnmsgr.exe'"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = " & strProcessKill )
For Each objProcess in colProcess
objProcess.Terminate()
Next
WSCript.Echo "Just killed process " & strProcessKill _
& " on " & strComputer
WScript.Quit
' End of WMI Example of a Kill Process
yada
strComputer = "."
strProcessToKill = "msnmsgr.exe"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = '" & strProcessToKill & "'")
count = 0
For Each objProcess in colProcess
objProcess.Terminate()
count = count + 1
Next
Üstteki örnegimizde messenger (msnmsgr.exe) sonlandirilmistir , siz bunun yerine istediğiniz başka bir yazılımin exe sini yazabilirsiniz.bu kodları bir notepad e yapıştırıp ve Dosya - Farklı Kaydet... seçeneğine tıklayın

Açılan pencerede herhangi bir isim verin (dosya ismini istediğiniz şekilde düzenleyin ) ve uzantısı .bat/.vbs... olarak kaydedip çalıştırın

Velociraptor




