Question How to create client process termination using WMI

kerengga

Member
Joined
Mar 15, 2010
Messages
6
Programming Experience
Beginner
Hello, i'm new for VB.net but i have to make my final year degree project using it. I have to create client-server application where the server can monitor all the process on client using WIN32 library on WMI. Anyone have any idea how to make a command to kill the process on client as we request it?
 
Yes, WMI is a common Windows administation interface. Just be aware there are limitations in functionality in such early Windows versions. The documentation for the WMI classes explain what versions they work with.
 
my project is almost done. the server is connected to client and the WMI info retrieve successfully. But, the problem is, how to terminate client process from server?

i get this vbs script to retrieve data.

strComputer = "192.168.0.2"
strDomain = "hafiz.net"
strUser = "Administrator"
strPassword = "root"
Wscript.Echo

Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objSWbemLocator.ConnectServer(strComputer, _
"root\CIMV2", _
strUser, _
strPassword, _
"MS_409", _
"ntlmdomain:" + strDomain)
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM Win32_Process",,48)
For Each objItem in colItems
Wscript.Echo "-----------------------------------"
Wscript.Echo "Win32_Process instance"
Wscript.Echo "-----------------------------------"
Wscript.Echo "ProcessId: " & objItem.ProcessId
Next
 
Switch to VB.Net in Code Language menu in Code Creator to get VB.Net code. The code you posted is for VB Script. In VB.Net you should use System.Management and not wbemscripting. Use the "Execute a method" tab to generate sample code for executing a method.
 
oh no!
i try to make a connection to my client application but the apps is crash where the vshost.exe is stop. i try the apps through local host. its succeed. in client server environment, it crash..What happen??? You have any idea?
 
Back
Top