Hey there...
Plz...
I'm writing a Windows Service that will check every x minutes if another
program is running. If it cannot find the application running, it launches
it...
I had already enough trouble with make the timer tick... lol...
Here's the code that i'm using:
Dim sPath as String = "c:\project1.ex e"
Dim iRunning as integer = 0
Dim p as Process
For Each p In Process.GetProc esses
If p.ProcessName.T oString.ToUpper = sProcess.ToUppe r
Then
iRunning = -1
Else
If iRunning >= 0 Then
iRunning += 1
End If
End If
Next
If iRunning >= 0 Then
'Process.Start( sPath) 'Tried already both of
these...
Shell(sPath)
End if
Tks in advance,
Christiano Donke...
Plz...
I'm writing a Windows Service that will check every x minutes if another
program is running. If it cannot find the application running, it launches
it...
I had already enough trouble with make the timer tick... lol...
Here's the code that i'm using:
Dim sPath as String = "c:\project1.ex e"
Dim iRunning as integer = 0
Dim p as Process
For Each p In Process.GetProc esses
If p.ProcessName.T oString.ToUpper = sProcess.ToUppe r
Then
iRunning = -1
Else
If iRunning >= 0 Then
iRunning += 1
End If
End If
Next
If iRunning >= 0 Then
'Process.Start( sPath) 'Tried already both of
these...
Shell(sPath)
End if
Tks in advance,
Christiano Donke...
Comment