i am just looking for a piece of code that i can fit into mine. I need to be able to scan for a specific process or scan the computer for a specific file.
There are going to be fewer processes running than files on your computer so scanning processes would certianly be faster. This post shows how to loop through all running proccesses and then kill one. You wouldnt want to run the kill code, obviously. Of course, if the process you are looking for isnt running, that doesnt mean it isnt on the hard drive.
I need something that does this: for example i have a text file and i want to have a list of processes in that text file that i want to end/stop. I need a piece of code to read the text file then end the processes that are running.
Between the link that I just gave you and the StreamReader Class you should be able to figure this out fairly easily. Give it a shot and if you are still having some troubles, post back here with some code youre having trouble with. These are some good code snippets -- if Ive understood you correctly, they are pretty much all youll need to put the required functionality together.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.