Home All Groups Group Topic Archive Search About

Installationpath Windows Service c#

Author
19 Oct 2006 2:35 PM
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

Author
20 Oct 2006 8:26 AM
Vadym Stetsyak
Hello, radinevi***@compuserve.de!

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
Author
20 Oct 2006 8:35 PM
SR
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


<radinevi***@compuserve.de> wrote in message
Show quote
news:1161268546.538651.19660@m7g2000cwm.googlegroups.com...
> 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
>

AddThis Social Bookmark Button