J
Jim Bob
I have a service that I want to start a process to run another process.
My code is
Sub ExecuteProcess()
Try
Dim Msg As String = "Download Service has fired"
Dim RunJob As New System.Diagnostics.Process
RunJob.StartInfo.FileName = "Runjob.bat"
RunJob.StartInfo.Arguments = Msg
RunJob.StartInfo.CreateNoWindow = False
RunJob.Start()
Catch ex As Exception
Dim Event1 As New EventLog
Event1.Log = "Application"
Event1.Source = "DownLoad Service"
Event1.WriteEntry("Error in ExecuteProcess. : " & Chr(13)
& ex.ToString)
End Try
End Sub
This code works fine from a non service app. When I run it inside a
service app, I get no errors but it doesn't appear to run.
Is there a way to run in a service?
jwc
My code is
Sub ExecuteProcess()
Try
Dim Msg As String = "Download Service has fired"
Dim RunJob As New System.Diagnostics.Process
RunJob.StartInfo.FileName = "Runjob.bat"
RunJob.StartInfo.Arguments = Msg
RunJob.StartInfo.CreateNoWindow = False
RunJob.Start()
Catch ex As Exception
Dim Event1 As New EventLog
Event1.Log = "Application"
Event1.Source = "DownLoad Service"
Event1.WriteEntry("Error in ExecuteProcess. : " & Chr(13)
& ex.ToString)
End Try
End Sub
This code works fine from a non service app. When I run it inside a
service app, I get no errors but it doesn't appear to run.
Is there a way to run in a service?
jwc