Hi,
I've never used AppDomain.CurrentDomain.BaseDirectory myself, so I really
don't know
Arild
"Michael Groeger" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Arild,
>
> thanks for your reply. I just tried
> System.AppDomain.CurrentDomain.BaseDirectory. I found this solution in
> log4net implementation because my logfile was written at the proper place,
> but I did not use absolute paths in the configuration. It seems to work
> fine, but whats the difference between your solution and my one?
>
> Regards,
> Michael
>
> "Arild Bakken" <arildb_@hotmail.com> schrieb im Newsbeitrag
> news:#(E-Mail Removed)...
>> System.Reflection.Assembly.GetExecutingAssembly() returns the current
>> assembly, and it has properties to get it's location (Codebase,
> Location...)
>>
>>
>> Arild
>>
>> "Michael Groeger" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Hi all,
>> >
>> > normally, when starting a service the current directory
>> > (System.Environment.CurrentDirectory) is the system directory of the
>> > platform. The service itself can be started from another location e.g.
>> > c:\foo\bar\myservice.exe . Is there a way to get the directory the
> service
>> > executable was started from, in my example c:\foo\bar\?
>> >
>> > Kind regards and thanks for your help in advance,
>> > Michael
>> >
>> >
>>
>>
>
>