vbs. Не понимаю, как стартует третий екзешник, поэтому его старт не организовавал никак
Код:

Exe1 = "winamp.exe"
Exe2 = "Notepad.exe"
Exe3 = "Calc.exe"
Path1 = "C:\Program Files\Winamp"
Path2 = "C:\Windows\System32"
Set WMI = GetObject("winMgmts:")
nExe1 = CountProc(WMI, Exe1, Proc1)
nExe2 = CountProc(WMI, Exe2, Proc2)
nExe3 = CountProc(WMI, Exe3, Proc3)
If Not (nExe1 = 1 And nExe2 = 1 And nExe3 = 1) Then
Call Killer(Proc2, nExe2)
Call Killer(Proc3, nExe3)
With CreateObject("WScript.Shell")
If nExe1 <> 1 Then
Call Killer(Proc1, nExe1)
.Exec Path1 + "\" + Exe1
WScript.Sleep 5000
End If
.Exec Path2 + "\" + Exe2
End With
End If
' ==================================
Function CountProc(WMI, Exe, Processes)
On Error Resume Next
Err.Number = 0
Set Processes = WMI.ExecQuery("SELECT * FROM Win32_Process Where Name=""" + Exe + """")
If Err.Number = 0 Then
CountProc = Processes.Count
Else
CountProc = -1
End If
On Error GoTo 0
End Function
Sub Killer(Processes, N)
If N < 1 Then Exit Sub
For Each Process In Processes
Process.Terminate
Next
End Sub
Файлы и пути пропишИте свои