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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top