How to get App path of WinService

  • Thread starter Thread starter Lin BoRen
  • Start date Start date
L

Lin BoRen

I was using Environment.CurrentDirectory when I tested my class in a winform
wrapper, but but now that I've move it to a WinService this gives me
"C:\WinNT\System32"
How can I get the Path of my assembly?

Thanks in Advance,
Byron
 
System.IO.Path.GetDirectoryName
(System.Reflection.Assembly.GetExecutingAssembly
().Location)

Hope this helps

Regards

Deepak
#*#*#*#*#*#*#*#*#*#*#*#
I Code, therefore I am
 

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