Freaxxx, как-то так:
Код:
#NoTrayIcon
$s_KillProcess = 'process1.exe'
$_OpenProcess = 'file.exe'
$s_OpenProccessPath = 'C:\path\to\' & $_OpenProcess
While True
If ProcessExists($s_KillProcess) Then
ProcessClose($s_KillProcess)
If Not ProcessExists($_OpenProcess) Then
Run($s_OpenProccessPath)
EndIf
EndIf
WEnd
Код не тестировал.