Getting Windows Service full path

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • R A

    #1

    Getting Windows Service full path

    Hi,

    I have a Windows Service C# application.
    How can I get the full path of the application exe?


    Thanks,
    Ronen



  • Qiu Zhang

    #2
    Re: Getting Windows Service full path

    One way you can try is to use Assembly.Locati on to find out the exe path
    e.g.
    Assembly sbl = Assembly.GetAss embly(XXX);//XXX is the type of your services
    String mpath = sbl.Location;

    Hope it helps
    Qiu

    "R A" <ron_a1@hotmail .com> wrote in message
    news:eVnE3QDXDH A.1640@TK2MSFTN GP10.phx.gbl...[color=blue]
    > Hi,
    >
    > I have a Windows Service C# application.
    > How can I get the full path of the application exe?
    >
    >
    > Thanks,
    > Ronen
    >
    >
    >[/color]


    Comment

    • codewriter

      #3
      Re: Getting Windows Service full path

      Is it the path of your service app or some other app that you are trying to
      work with?

      "R A" <ron_a1@hotmail .com> wrote in message
      news:eVnE3QDXDH A.1640@TK2MSFTN GP10.phx.gbl...[color=blue]
      > Hi,
      >
      > I have a Windows Service C# application.
      > How can I get the full path of the application exe?
      >
      >
      > Thanks,
      > Ronen
      >
      >
      >[/color]


      Comment

      Working...