Kill All Non Essential Processes?
Oct 14, 2010
I made an application that helps facilitate malware removal by running a bunch of different CLI scanners at once; among other things.
The app was made to run in normal and safe mode. The problem, is that since it has been made to run in normal mode, it essentially becomes useless if the malware has installed a rootkit that kills executables as they open or if they've messed with the exe file association in the registry.
So, to get my app to run, I thought to do 2 things.
First, change the file association of my app to either .com, scr, or .pif so that it can still launch but won't be affected by messed up reg keys or identified by the rootkit.
But, I still need to worry about that rootkit for the other apps.
So I thought to just kill all non essential processes.
What would be the best way to accomplish this?
I thought of two different ways:
I could either have a pre-compiled list of system processes that need to stay running or when looping through the processes, I can identify each by a specific property, like company name or something else.
View 3 Replies
ADVERTISEMENT
Apr 11, 2012
I currently have the following up in VS 2010
Dim myProcess() As Process = System.Diagnostics.Process.GetProcessesByName("calc")
For Each myKill As Process In myProcess
myKill.Kill()
However I cannot seem to get it to kill more than one process. Example I've tried
("calc",mspaint")
("calc,mspaint")
("calc"),("mspaint")
View 1 Replies
Feb 5, 2012
I have a snippet how to kill multiple instances of one proccess
Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName("notepad")
For Each p As Process In pProcess
p.Kill()
Next
If i want to kill multiple instances of "notepad","excel" and "word" how the code should look?
View 2 Replies
Jul 3, 2011
I'm trying to create a small productivity program to keep myself focused when programming; specifically, to close any processes that might distract me from doing my job.What is the easiest way to kill all processes listed in a listBox? I already know how to add the processes to my listBox with this code: [code]This adds the processes to the listBox very neatly and all, exactly how I want it. I have a timer that gets enabled with the press of a button that should close all processes in the listBox.
View 1 Replies
Apr 10, 2010
Wazzup everyone I'm trying to make a program that manages my processes. I'm having trouble killing processes off of a listbox. I know how to kill a process just not off of a listbox because it returns in the following format:
System.Diagnostics.Process(notepad)
Here's what I've tried so far.
Killp = ListBox1.SelectedItem.ToString
Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName(Killp)
For Each p As Process In pProcess
DialogResult = MessageBox.Show("Are you sure you want to kill this process?" &
[Code] .....
View 7 Replies
Dec 2, 2008
I do computer repair for my local store and I have been noticing a ton of computers coming in with a fake antispyware program called antivirus 2008. I am trying to make a program that by clicking a button I can end the processes it loads. For now I just need to kill these processes.[code]...Kill Multiple Processes By Clicking Button?
View 2 Replies
Feb 16, 2012
I have a snippet below how to kill multiple instances of different processes by the name of exe file
For Each processName As String In {"notepad", "word", "excel"}
Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName(processName)
For Each p As Process In pProcess
p.Kill()
Next
Next
But if user will change the name of exe file it will not work. So the question is how to kill them by window title which contains {"notepad", "word", "excel"}?
View 6 Replies
Oct 20, 2010
here is what I'm trying to do (partly in pseudo code):
Public Sub KillProcess(ByRef strProcessToKill As String)
Dim proc() As Process = Process.GetProcesses
For i As Integer = 0 To proc.GetUpperBound(0)
If proc(i).ProcessName = strProcessToKill Then
proc(i).Kill()
End If
[Code]...
The killprocess part works fine. However, if I try a "For Each App As Process In Process.GetProcessesByName("chrome"") approach and have several chrome windows open then it will display the question 5 times if there are 5 chrome processes open.
View 4 Replies
Oct 15, 2011
I am trying to kill a process by using the following code
Dim aprocess As System.Diagnostics.Process
aprocess = System.Diagnostics.Process.GetProcessesByName("E:\preview.mp3")
[code].....
View 5 Replies
Jan 16, 2011
I have built a web browser using vb.net and I want the user to use this only, that is I would like to restrict user form using any other browsers.So the question is, how to kill a process (IE) the moment user opens it. I am able to get all the processes and able to kill the current process. But the current process is always my app.
View 7 Replies
Feb 22, 2010
I've launched wampserver using vb.net when the application loads. My problem is, how do I kill the wamp server process when I exit the program.
View 1 Replies
Feb 17, 2011
If I want to abort or end this operation, myprocess.kill() does not work I'm thinking that the Cmd box gets killed but tsmuxer remains alive to fight another day.
[Code]...
View 2 Replies
Jun 22, 2010
This is what I have so far.[code]...
View 7 Replies
Jun 2, 2012
On my exit button I have application.exit but this does not kill my application all teh time as sometimes I can see the process still running when I go into task manager, is there a way to kill the process when i close my application?
View 5 Replies
Jul 29, 2010
I want to kill explorer.exe process in vb.net
View 6 Replies
May 18, 2009
I am looking for a way to kill a system process.my program is printing a word doc but i have noticed that one it has printed the process Winword.exe is still running in the task manager!does anyone know how once i have printed and closed word i can kill the process?
View 5 Replies
Jun 25, 2009
Is there any way we can kill a driver (.sys file)?
View 10 Replies
Mar 11, 2012
I've been doing some research on controlling another exe without Process.Kill() .
The reason why is that I want to have a main controller program that starts and terminates my other exes . I can't use Process.Kill() it just kills my exe without giving it a chance to save data or handle the form closing event . I want to separate my program to multiple exes to prevent a scenario which is if one of the exe hangs , all the other exe hangs .
When the termination event or signal is received , then the exe would do a rollback or handle the closing part to prevent data loss etc .
So far , I've only found some methods of doing that .
1) using TxT files to communicate between exes.
2) Inter-Process Communication (IPC) using name pipes .
View 14 Replies
May 28, 2009
I am developing a large, multi-windowed application. It creates a console using AllocConsole and uses it to dump various information useful for diagnosing and debugging situations with the hardware. The program drives sensitive scientific equipment, and CANNOT be allowed to quit abruptly in midstream. Unfortunately, clicking the close box on the console window does exactly that.
1. Suppress or disable the close box on the console window
2. Trap that event, or
3. Adjust something so that my process does not depend upon its console for its life?
View 2 Replies
Mar 10, 2011
i m trying to kill a background worker in the do work event of the worker i was using
backgroundworker.CancleAsync()
but its shows an error saying tat CancellationPending does not allow
how can i kill a background worker after its work gets completed in its do work event
View 1 Replies
Jul 15, 2011
I am having a text file in this path "C:Test est.txt" when this was openeed I need to close this.
When I am trying to use the below code all the instances of notepad are closing and I don't want that to be happened and I want to close only the ".txt" file:Here is my code:
Dim Process() As Process = System.Diagnostics.Process.GetProcessesByName("notepad")
For Each p As Process In Process
p.Kill()
Next
View 2 Replies
Jan 22, 2009
Public Function RsReDir()
'function to restart dns redirector - working as of 12-11-08'
Dim plist As Process() = Process.GetProcesses()
[code].....
View 1 Replies
Sep 30, 2009
I have 2 listboxesdoes anybody have a code to remove dupes from both listboxes if dupes exist?
View 5 Replies
Jul 11, 2011
I am using normal thread and I am new to the thread. I want to know effective way of killing thread. I came to know that aborting thread is not good. Somewhere I read we can do this with having continue check on thread processing
View 7 Replies
Dec 22, 2007
Let's say i create 3 different process like this:
For i = 1 To 3
im pr As New Process
pr.StartInfo.UseShellExecute = True
[code].....
View 8 Replies
Jun 22, 2010
How to kill a process?[code]...
View 2 Replies
Jun 22, 2010
I need to kill a specific process, i got ListBox1, and Button1 and Button2
Button1 Gets Process which is notepad, When Button1 is clicked in the ListBox1 it shows the Main titled of the windows, Example Notepad is running and his title is Untitled - Notepad in Listbox1 will show the title, And the Button2 Should kill the process of the selected item in the ListBox1, Like i Got 2 Notepad open, 1 with titled 1 and other with title 2, when i select in ListBox1 the one that says 1 and i click button2 it should kill the notepad process that have the titled 1 no all the notepads.
Button1 Code
Dim iGet() As Process = Process.GetProcessesByName("notepad")
Me.ListBox1.Items.Clear()
[Code]...
But it closes all notepad process, not even selecting the iem from ListBox1 and then Button i need it..
View 10 Replies
Nov 12, 2010
Can anyone tell me how to kill a thread immediately.
I have tried MyThread.Abort, but it seems to do nothing. Someone told me it's because 'Abort' waits for the current operation to complete, but my thread will run for over 30 minutes before that happens.
View 4 Replies
Jan 21, 2009
Public Function RsReDir() 'function to restart dns redirector - working as of 12-11-08'
Dim plist As Process() = Process.GetProcesses() 'Get and parse list of processes to plist'
For Each p As Process In plist 'parse each entry in plist as p process'
Try
If p.MainModule.ModuleName.ToLower() = "dnsredir.exe" Then p.Kill() 'If module name of process matches "dnsredir.exe" then kill p'
Catch
[code]....
i would like to kill and restart dnsredir.exe file but the code doesnt' seem to work?
View 1 Replies
Mar 11, 2010
So there only only two threads on the forum regarding killing explorer.exe, and neither one answers the question.Does anyone know how to kill explorer.exe (yes the Windows shell) and keep it from re-spawning? It is obviously possible, since taskkill does it. And for the moment I am using taskkill to accomplish this. But it sure would be nice to have a coded solution.
And yes I know what will be disabled when I kill explorer.exe, and yes this is exactly what we (the company at which I am employed) want to happen so please don't just tell me this is a BAD IDEA, like all the other forums on the internet have done to the people who have asked this.I have tried using the approach of looping through the array returned from Process.GetProcessesByName("explorer"), then killing each one of those returned processes. I have tried this in C++ with the native API... just in case there was some difference in the way the .NET libraries called things... In both cases explorer exits for a few seconds, then comes right back. The behaviour I would like to duplicate is that of "taskkill /f /im explorer.exe"
View 2 Replies