Hey HF this is a simple method to stop your process from being stopped by any program. It works by finding out the processes .exe then checking if the process is running every two seconds. If the process is not running it starts the process up again. I am also working on Registry and file protection and will post them in the morning. This is by no way a finished product and is still very buggy. Any Ideas on how to improve it would be great 👍. Anyway the code is here:
Usage:
If you get "file not found" errors just replace all the find_exe stuff with "Dim file = "your file directory""
Thanks for reading this
regards
Razor Sharp
Code
Imports System.ComponentModel
Module Module1
Dim t() As Process
Sub Find_exe(ByVal process_name As String)
'finds the location of the executable
For Each p As Process In Process.GetProcessesByName(process_name)
Dim file As String
Try
file = p.Modules(0).FileName
Catch ex As Win32Exception
file = "n/a"
End Try
IsItRunning(file, process_name)
Next
End Sub
Private Sub IsItRunning(ByVal file As String, ByVal process_name As String)
While True
t = Process.GetProcessesByName(process_name)
If t.Count > 0 Then
' Process is running
System.Threading.Thread.Sleep("2000")
Else
Process.Start(file)
' Process is not running
End If
End While
End Sub
End ModuleCode
Find_exe("your_process_name")Thanks for reading this
regards
Razor Sharp


![[Image: logo.gif]](https://datap.pro/threadimage/logo.gif)

![[Image: gh_banner.png]](https://hexui.com/asset/img/gh_banner.png)