TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
riverbr
NA
1
0
Please Look at my code - Help
Apr 26 2004 3:08 PM
I need your assistance (I'm pretty new and I'm trying to convert from scripting to VB.Net).. I'm having problems understating the help from Microsoft on how to run/use a method using the System.Management name space. Here is what I'm trying to do. example. Below is a function. As you can see I trying to pull the list of process from a computer and I would like to terminate process a particular process -- But I'm stuck. I do not know the syntax. Please give me an example. Function FTerminate(ByVal ComputerName As String, ByVal StrProcessName As String) As String Dim strResult As String Dim objectQuery As New System.Management.ObjectQuery("Select * From Win32_Process") Dim scope As New System.Management.ManagementScope("\\" & ComputerName & "\root\cimv2") scope.Connect() Dim patch As New ManagementObjectSearcher(scope, objectQuery) Dim strProcess As ManagementObject For Each strProcess In patch.Get If strProcess("Caption") = StrProcessName Then strProcess _ ______> terminate Method here please assist. End If Next Return strResult End Function End Module Thank you Regards, Braulio
Reply
Answers (
1
)
Problem navigating an access database.
printing part of a page without feeding entire page through printer