Running an EXE from c#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anant Raman

    #1

    Running an EXE from c#

    Hi

    I have an exe file on my machine. I need to launch this exe from the windows
    service (written in c#) running on my machine. The service knows about the
    path where the exe resides. How do I launch the exe from the service.

    Any help will be highly appreciated.

    Thanks
    Anant


  • Joe Mayo

    #2
    Re: Running an EXE from c#

    Hi Anant,

    Here's a FAQ on launching the process:

    http://blogs.msdn.com/csharpfaq/arch...01/146375.aspx

    If this is a background process, you will be good to go. However, remember
    that a Windows Service only runs in the background. This means that any
    time you launch a process, you will not see the GUI.

    Joe
    --
    Welcome to C# Station!  This is a community site for people interested in applying .NET using the C# programming language.  We’ve been around since July 4th 2000 and have continued to grow over the years.  Items of interest include Articles, Books, Links, Documentation,  and Tutorials. More… Source Code If you would like to see an […]


    "Anant Raman" <anant@suviinfo .com> wrote in message
    news:%23I6jLRbp EHA.1160@tk2msf tngp13.phx.gbl. ..[color=blue]
    > Hi
    >
    > I have an exe file on my machine. I need to launch this exe from the[/color]
    windows[color=blue]
    > service (written in c#) running on my machine. The service knows about the
    > path where the exe resides. How do I launch the exe from the service.
    >
    > Any help will be highly appreciated.
    >
    > Thanks
    > Anant
    >
    >[/color]


    Comment

    • Irfan

      #3
      RE: Running an EXE from c#

      Anant,

      you could launch your exe by using the
      System.Diagnost ics.Process.Sta rt("Path to your exe")

      you could further take a look at
      http://msdn.microsoft.com/library/de...ramVisualC.asp

      Also, you could further add a timer control and fire the event at what ever
      time required so that the exe is invoked only when needed

      HTH
      irfan

      Comment

      Working...