Results 1 to 2 of 2

Thread: Launch a process from a Windows Service

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2004
    Posts
    7

    Launch a process from a Windows Service

    I tried lauching Internet Explorer from a Windows Service. It didn't work. However, the same code works in a console application.

    Here is the code...


    Private Sub Timer1_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
    Try
    Process.Start("IExplore.exe", "www.gotdotnet.com")
    EventLog1.WriteEntry("Launched!")
    Catch ex As Exception
    EventLog1.WriteEntry("Could not launch Internet Explorer")
    End Try
    Beep()
    End Sub

    Surprisingly, the above code adds an entry "Launched!" to the Event log everytime the timer fires but it does not lauch the browser.

    Please help.
    Shashi

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Just because you don't see it doesn't mean its not there. The service is not running in the same space as your desktop so if it launches a browser then the user still wont see it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width