如果我的主进程或父进程被“结束进程树”在任务管理器中杀死,我如何保留我的子进程?
Private Sub Sexecute(ByVal exe As String)
Dim getPath As String = Application.StartupPath
Dim startInfo As New ProcessStartInfo
startInfo.FileName = exe
Process.Start(startInfo)
End Sub
''System.Threading.Timer
Private Sub LockEpsonCallBack(ByVal state As Object)
'''Check if Tree Locker is in the process
Dim tlockerfound As Boolean
For Each list As Process In Process.GetProcessesByName("tlocker")
tlockerfound = False
If list.ProcessName = "tlocker" Then
tlockerfound = True
Exit For
End If
Next
If tlockerfound = False Then
Sexecute("tlocker.exe")
End If
End Sub
有没有办法做到这一点?