I'm trying to terminate a process on my local PC using WMI's
.ProcessTerminate method. It's returning a value of 2 ("Access Denied"). I
can kill the same process from Task Manager without difficulty.
I searched MSDN for this situation and came up with the following page:
"Terminate Method of the Win32_Process Class"
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/terminate_method_in_class_win32_process.asp).
This page mentions enabling the SeDebugPrivilege privilege through VBScript
to get around this error; however, the the VBScript code that would
illustrate how to enable the SeDebugPrivilege privilege seems to be missing
from the page! Any idea where this--or similar--code can be found?