1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Private Sub Timer1_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
'Beep()
WriteToFile("c:\MonService", "TestLog.txt", "BEEP from service : " & Date.Now.ToLongTimeString & " -- " & Date.Today.ToShortDateString)
'Process.Start("c:\monService\TSession.exe")
System.Diagnostics.EventLog.WriteEntry("bke on service timer", "ca marche")
Dim pr As New Process
Try
MsgBox("message directement de mon service")
pr = Process.Start("c:\monService\TSession.exe")
pr.WaitForExit()
Catch ex As Exception
Finally
pr.Close()
End Try
End Sub |
Partager