Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Kill Process under a different security contextContent of Kill Process under a different security context.vbsMD5 Hash: BC4C409177243BED9003B7E860B10C65 |
||
Option Explicit
Dim strComputer : strComputer = "." Dim strProcessName : strProcessName = "notepad.exe" Dim oWMIService : Set oWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") oWMIService.Security_.ImpersonationLevel = 3 oWMIService.Security_.privileges.addasstring "SeDebugPrivilege", True Dim colProcessList : Set colProcessList = oWMIService.ExecQuery("Select * from Win32_Process Where Name = " & Chr(34) & strProcessName & Chr(34)) Dim oProcess For Each oProcess in colProcessList oProcess.Terminate() Next Set oWMIService = Nothing Set colProcessList = Nothing | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |