Installationpath Windows Service c#

  • Thread starter Thread starter radineviges
  • Start date Start date
R

radineviges

How can i get the path of the installation folder of my service?
(The service itself should access a file installed in the same
directory.)

Thanks in advance
 
Hello, (e-mail address removed)!

If it is in runtime you can do Assembly.GetEntryAssembly().Location

r> How can i get the path of the installation folder of my service?
r> (The service itself should access a file installed in the same
r> directory.)

r> Thanks in advance


--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Are you trying to get the path during installation or once the service is
running?

While the service is running:
System.AppDomain.CurrentDomain.BaseDirectory

If you need the path during installation, that requires more explanation so
let me know...

Seth
 
Back
Top