G
Guest
Hi Friends,
I apologize for posting this in the C# newsgroup. I
posted this question in the dotnet.scripting newsgroup
and got no response. If anyone of you is familiar with
VBScripting, kindly help me. Thanks a lot in advance.
The following script executes with no errors. However, it
does not terminate the process. Any ideas or suggestions
is appreciated.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name
= 'MyProcessName.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
..
I apologize for posting this in the C# newsgroup. I
posted this question in the dotnet.scripting newsgroup
and got no response. If anyone of you is familiar with
VBScripting, kindly help me. Thanks a lot in advance.
The following script executes with no errors. However, it
does not terminate the process. Any ideas or suggestions
is appreciated.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name
= 'MyProcessName.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
..