Getting Windows Service full path

  • Thread starter Thread starter R A
  • Start date Start date
R

R A

Hi,

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


Thanks,
Ronen
 
Is it the path of your service app or some other app that you are trying to
work with?
 
One way you can try is to use Assembly.Location to find out the exe path
e.g.
Assembly sbl = Assembly.GetAssembly(XXX);//XXX is the type of your services
String mpath = sbl.Location;

Hope it helps
Qiu
 
Back
Top