var objProcess;
var colProcess;
var strComputer = ".";
var strProcessKill = "'calc.exe'"
var objWMIService = GetObject("winmgmts:\\\\.\\root\\CIMV2");
var colProcess = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = " + strProcessKill )
var enumItems = new Enumerator(colProcess);
for (; !enumItems.atEnd(); enumItems.moveNext()) {
var objItem = enumItems.item();
objItem.Terminate()
WScript.Echo("fund" );
}
WScript.Echo("Just killed process " + strProcessKill + " on " + strComputer );
Donnerstag, 16. Februar 2012
jscript terminate process
Abonnieren
Kommentare zum Post (Atom)
Keine Kommentare:
Kommentar veröffentlichen